#tree-sitter #typescript #tsx #incremental #parser

tree-sitter-typescript-codemod

TypeScript and TSX grammars for tree-sitter

1 unstable release

0.25.0-codemod.1 Feb 3, 2025

#190 in Text editors

Download history 68/week @ 2025-01-28 52/week @ 2025-02-04

120 downloads per month

MIT license

18MB
567K SLoC

C 566K SLoC JavaScript 1K SLoC // 0.1% comments Rust 50 SLoC Scheme 43 SLoC // 0.1% comments

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

Dependencies