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

#240 in Parser implementations

Download history 4724/week @ 2024-01-22 5745/week @ 2024-01-29 4920/week @ 2024-02-05 4012/week @ 2024-02-12 4021/week @ 2024-02-19 3112/week @ 2024-02-26 3233/week @ 2024-03-04 2880/week @ 2024-03-11 2738/week @ 2024-03-18 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

13,231 downloads per month
Used in 37 crates (29 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.7–4MB
~71K SLoC