Skip to content
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

Fix syntax highligiting for generic function #99

Merged
merged 1 commit into from
Nov 4, 2019

Conversation

yuezk
Copy link
Collaborator

@yuezk yuezk commented Nov 4, 2019

Test case:

The generic function use case:

const head = <T>(arr: T[]): T => arr[0];

This will break the use case like:

const title = <T>(This is a title element)</T>;

But I think the latter case is less common and we can avoid it by using another component name. While the generic function is a more common use case and the workaround <T,> is a bit of hacky.

#86

@yuezk yuezk merged commit ddc08c4 into MaxMEllon:master Nov 4, 2019
@yuezk yuezk deleted the fix-syntax-86 branch November 4, 2019 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant