Wrong formatting of the trick for generics in tsx
See original GitHub issueI’m not sure should it be solved here on at prettierx.
<T,>(props: Props<T>) => {}
will be fomatted without a space: <T,>
, but standard adds this space.
Related issue https://github.com/brodybits/prettierx/issues/107
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
How To Use Generics in TypeScript - DigitalOcean
Generics appear in TypeScript code inside angle brackets, in the format < T > , where T represents a passed-in type.
Read more >Typescript TSX and generic parameters - Stack Overflow
So I have an expression that works quite well with traditional *.ts files but no with *.tsx ones: const f = <T1>(arg1: T1)...
Read more >Documentation - Type Checking JavaScript Files - TypeScript
In a .js file, TypeScript understands the CommonJS module format. Assignments to exports and module.exports are recognized as export declarations.
Read more >TypeScript Arrays - TutorialsTeacher
An array in TypeScript can contain elements of different data types using a generic array type syntax, as shown below. Example: Multi Type...
Read more >Creating an SVG Icon System with React - CSS-Tricks
... and Chris Coyier wrote another awesome article here on CSS-Tricks as well. ... with (or ourselves) that we're using props incorrectly.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sorry I’m not fluent with what prettier can do 😃
On Wed, 15 Jan 2020 at 08:43, Uladzimir Havenchyk notifications@github.com wrote:
Nice, thanks @sheerun, I’ll check it. I migrated my codebase to
T extends unknown
. See who started it 😄?