tree-sitter / tree-sitter-typescript

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

Bracket type casting not supported #232

Closed ryan-s-wilson closed 5 months ago

ryan-s-wilson commented 1 year ago

The following piece of code is valid but it is parsed incorrectly:

property: PropertyType = <PropertyType>methodReturningOtherType();

Cloudflare is currently inaccessible in my office so I will provide the other documentation at a later time. Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript:

The output of tree-sitter parse is the following:

amaanq commented 5 months ago

seems to parse fine now on master, let me know if it's still not fixed.