Flow Generics reported as error
See original GitHub issueFollowing is a valid flow syntax, but is reported as error by prettier plugin:
const funName = <T>(param: T): T => { // ... }
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
Flow functions with generics reported as error · Issue #1828 · prettier ...
Following is a valid flow statement, but is reported as error by prettier. const fun1 = <T>(param: T): T => param; const fun2...
Read more >Flow's Improved Handling of Generic Types - Medium
Flow has improved its handling of generic types by banning unsafe behaviors previously allowed and clarifying error messages.
Read more >Flow doesn't allow me to pass generics with more properties ...
I asked this to flow maintainers and seems that I was actually pretty close. I was just missing a plus sign on the...
Read more >Generic Types | Flow
Generics can be used within functions, function types, classes, type aliases, and interfaces. Warning: Flow does not infer generic types. If you want...
Read more >Parsing error when calling generic function with type arguments
The first time I saw this error, my first impression was that I forgot to import XType , so I scrolled to the...
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
@darahak Thanks for verifying. Submitted a bug #1828
closing since this is a prettier issue