9 releases

0.21.1 May 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

#119 in Parser implementations

Download history 5014/week @ 2024-02-02 4192/week @ 2024-02-09 3924/week @ 2024-02-16 3325/week @ 2024-02-23 3305/week @ 2024-03-01 3061/week @ 2024-03-08 2529/week @ 2024-03-15 3229/week @ 2024-03-22 1801/week @ 2024-03-29 2702/week @ 2024-04-05 2803/week @ 2024-04-12 3146/week @ 2024-04-19 2852/week @ 2024-04-26 3871/week @ 2024-05-03 3597/week @ 2024-05-10 2423/week @ 2024-05-17

13,341 downloads per month
Used in 38 crates (30 directly)

MIT license

25MB
787K SLoC

C 786K SLoC JavaScript 1K SLoC // 0.1% comments Rust 48 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.8–4MB
~72K SLoC