Closed DontBreakAlex closed 2 years ago
Thanks for the report. I'm unclear about how well we support declarations in .d.ts
files. My own questions is:
Is there any special syntax in the .d.ts
files that's not part of regular .ts
typescript?
We use tree-sitter-typescript in semgrep and we tend to get excellent parsing rates (99.87% lines not affected by ERROR
nodes) on .ts
files - which is what matters the most to us - and much lower rates on .d.ts
files (not sure how much but less than 80%, possibly much closer to 0%).
The following piece of code is valid but it is parsed incorrectly:
TS Playground URL
The output of
tree-sitter parse
is the following:I'm trying to parse typescript's lib type definitions. The pattern
T extends abstract new
seems to be unrecognized.