Closed mjambon closed 5 months ago
Hya, I'm looking to build a linter for TS in Haskell.
For this, I'll need to use haskell-tree-sitter
which depends on this lib.
Is there any chance of getting support for the satisfies operator anytime soon?
If not, some pointers on how to add it would be useful. I might try and add support for it myself, Thanks!
Looks like this was fixed in https://github.com/tree-sitter/tree-sitter-typescript/pull/228
The following piece of code is valid but it is parsed incorrectly:
Here's a link to the TypeScript Playground showing that the snippet above is valid JavaScript or TypeScript:
https://www.typescriptlang.org/play?ts=4.9.5#code/MYewdgzgLgBAhjAvDALAJhhOUCWEBmOAphDGAK4C2ARkQE4DcAUEA
The output of
tree-sitter parse
is the following:Documentation: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-9.html#the-satisfies-operator
Originally reported here: https://github.com/returntocorp/semgrep/issues/7197