vscode-language-babel icon indicating copy to clipboard operation
vscode-language-babel copied to clipboard

Flow function as generic type

Open penx opened this issue 5 years ago • 1 comments

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);

penx avatar Mar 23 '20 15:03 penx

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>

d3dc avatar Nov 01 '20 16:11 d3dc