michaelgmcd / vscode-language-babel

VSCode syntax highlighting for today's JavaScript
https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel
MIT License
131 stars 17 forks source link

Flow function as generic type #65

Open penx opened 4 years ago

penx commented 4 years ago

Describe the issue Supplying a function as a Flow type argument to a generic callable breaks syntax highlighting.

Screenshot of Current Behavior Screenshot 2020-03-23 at 15 04 00

Sample Code to Reproduce

// @flow
import { createContext } from 'react';

export const Working = createContext<number>(1);
export const Breaks = createContext<() => void>(() => undefined);
export const Broken = createContext<number>(1);
d3dc commented 3 years ago

Running into this here as well:

Screen Shot 2020-11-01 at 9 42 14 AM

Same as above, the culprit is:

 React.useState<() => React.ReactNode>