You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by fisker Cheung, tyankatsu, Alexander Kachkaev, Glen, Raffael Campos, Borek Bernard, Joe Alden, Jan Aagaard, sāmīr, ZHAO Jin-Xiang and 16 more
Reacted by fisker Cheung, SUZUKI Sosuke, Alexander Kachkaev, Glen, Borek Bernard, Quinn Chaffee, Joe Alden, Orvar, Herberth, Mickael Bourgois and 5 more
Yep and it may be useful to drop if its anything other than any or unknown but may be getting more into a linting-like situation there which @typescript-eslint should instead implement.
Def looking forawrd to this for the variadic tuples once prettier supports it :-P
another one to look out for that isn't obvious at first:
typeReduceNextElement<Textendsreadonlyunknown[]// eslint-disable-next-line prettier/prettier>=Textendsreadonly[infer V, ...infer R] ? [V,R] : never
Hello @sosukesuzuki, I am still experiencing the issue reported by @bradennapier above, in which ...infer T is incorrectly replaced with ...(infer T). I am using Prettier 2.1.0. I will work around this with // prettier-ignore for now.
Activity
orta commentedon Jun 26, 2020
Also a
catchclause can legally have a type now (only: anyand: unknownare allowed) - today Prettier drops it entirelyPlayground
bradennapier commentedon Jun 27, 2020
Yep and it may be useful to drop if its anything other than
anyorunknownbut may be getting more into a linting-like situation there which@typescript-eslintshould instead implement.Def looking forawrd to this for the variadic tuples once prettier supports it :-P
another one to look out for that isn't obvious at first:
Prettier will currently change this to
which produces a ts error:
Where we expect the following:
fisker commentedon Jul 21, 2020
Type annotations on catch clauses #8805
wclr commentedon Jul 29, 2020
Labeled tuples not supported.
fisker commentedon Aug 3, 2020
Labeled tuples for
babel-ts#8885harrysolovay commentedon Aug 9, 2020
liamcarter111 commentedon Aug 21, 2020
Since Typescript official 4.0.2 was released to the masses yesterday, any update on when #8982 will be released?
sosukesuzuki commentedon Aug 21, 2020
We are working for release 2.1(#8882), please wait.
papb commentedon Aug 25, 2020
Hello @sosukesuzuki, I am still experiencing the issue reported by @bradennapier above, in which
...infer Tis incorrectly replaced with...(infer T). I am using Prettier 2.1.0. I will work around this with// prettier-ignorefor now.bradennapier commentedon Aug 25, 2020
Figured it'd get missed ;) subtle difference but completely breaks inference.
fisker commentedon Aug 25, 2020
Can you raise another issue? I think we missed that
papb commentedon Aug 25, 2020
@fisker Done! #9041