npm.io
0.23.2 • Published 1 year ago

tree-sitter-typescript

Licence
MIT
Version
0.23.2
Deps
3
Size
37.0 MB
Vulns
0
Weekly
0
Stars
525
Install scriptsThis package runs scripts during installation (preinstall/install/postinstall)

tree-sitter-typescript

CI discord matrix crates npm pypi

TypeScript and TSX grammars for tree-sitter.

Because TSX and TypeScript are actually two different dialects, this module defines two grammars. Require them as follows:

require("tree-sitter-typescript").typescript; // TypeScript grammar
require("tree-sitter-typescript").tsx; // TSX grammar

For Javascript files with flow type annotations you can use the tsx parser.

References

Keywords