It works fine when you move the type as a separate type definition
type Props = {
width: number;
height: number;
nodes: NodeData[];
edges: EdgeData[];
};
export const SvgDocument = forwardRef<SVGSVGElement, Props>(function SvgDocument({ width, height, nodes, edges }, ref) {
// function body
I don't know if both they use same library for syntax highligting (feels like they are same) but it seems to be working fine on github, has a minor glitch on vscode.
This is limitation of the tmLanguage grammar which doesnt let us determine if these are type arguments or expression followed by next variable declaration/binding pattern
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
function
keyword doesn't workIt works fine when you move the type as a separate type definition
I don't know if both they use same library for syntax highligting (feels like they are same) but it seems to be working fine on github, has a minor glitch on vscode.