Skip to content

Conversation

@gabelevi
Copy link

@gabelevi gabelevi commented Apr 2, 2019

In Flow, you can call a function an explicitly specify the types for the generics. For example

function foo<A, B>(a: A, b: B): void {}

foo<string, number>("hello", 123);

This PR attempts to update language-babel to support this syntax. It's a little complicated, since the grammar is somewhat ambiguous. For example, foo < bar > (123) is a valid expression in JavaScript, but Flow interprets it as a call expression with type parameters.

@kumarharsh
Copy link

Ah, this would be super nice! @gandm ping?

mroch added a commit to mroch/vscode-language-babel that referenced this pull request Aug 27, 2019
michaelgmcd pushed a commit to michaelgmcd/vscode-language-babel that referenced this pull request Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants