-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flow: Generic type parameters not supported on arrow functions #28
Comments
Thanks for the find. I'll take a more detailed look at this, but this may be a case where we'll have to use an unreliable heuristic. It looks like you're using JSX as well, and See this TypeScript issue, which is closed as a “Design Limitation”. In the mean time, I'd suggest using |
Thanks for looking into it. I'm not 100% familiar with how sublime syntax stuff works, but is there no way to capture the opening tag of jsx and only consider it jsx if theres a closing matching tag? So a just on its own is considered flow type, but is actually what makes it JSX (or as well i guess) |
I've also worked around it by separating the definition of the type and the implementation:
|
Don't know whether this is related to generic types, class properties or just angle bracket type definitions in particular, but: export default class ExampleComponent extends React.Component<Props> {
_iframe: React.Ref<typeof HTMLIFrameElement>
// Syntax highlighting broken beyond this point This happens with most angle-bracket stuff, for example |
@neutraali I've just fixed this in 1.0.19. The problem was that |
Thanks @Thom1729 👍 - Will do just as soon as you upload that to Package Control 😸 |
I'm using version v1.1.0-alpha.2
Generic types for arrow functions don't seem to be working.
The text was updated successfully, but these errors were encountered: