10 releases

0.21.2 Jul 6, 2024
0.20.5 Feb 1, 2024
0.20.3 Oct 4, 2023
0.20.2 Jan 24, 2023
0.19.0 Mar 9, 2021

#1 in #typescript-parser

Download history 2823/week @ 2024-03-25 1778/week @ 2024-04-01 3017/week @ 2024-04-08 2793/week @ 2024-04-15 3131/week @ 2024-04-22 3211/week @ 2024-04-29 3739/week @ 2024-05-06 3480/week @ 2024-05-13 2735/week @ 2024-05-20 5538/week @ 2024-05-27 5932/week @ 2024-06-03 6154/week @ 2024-06-10 6669/week @ 2024-06-17 6299/week @ 2024-06-24 5735/week @ 2024-07-01 7792/week @ 2024-07-08

27,201 downloads per month
Used in 43 crates (33 directly)

MIT license

18MB
584K SLoC

C 583K SLoC JavaScript 1K SLoC // 0.1% comments Rust 47 SLoC Scheme 45 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

~2.7–4MB
~71K SLoC