tree-sitter / tree-sitter-typescript

TypeScript grammar for tree-sitter
MIT License
335 stars 104 forks source link

Properly parse 'as const' #249

Closed guillaumebrunerie closed 12 months ago

guillaumebrunerie commented 12 months ago

This pull request improves how as const is parsed. Currently, an expression like "foobar" as const is parsed as if const were a type identifier, which is wrong, it is a keyword.

Checklist:

guillaumebrunerie commented 12 months ago

Closing in favor of #252.