13 unstable releases (3 breaking)

0.23.2 Nov 11, 2024
0.23.0 Sep 2, 2024
0.21.2 Jul 6, 2024
0.20.5 Feb 1, 2024
0.19.0 Mar 9, 2021

#173 in Parser implementations

Download history 16219/week @ 2025-01-28 16462/week @ 2025-02-04 18184/week @ 2025-02-11 18039/week @ 2025-02-18 18995/week @ 2025-02-25 21975/week @ 2025-03-04 18784/week @ 2025-03-11 16919/week @ 2025-03-18 13918/week @ 2025-03-25 12581/week @ 2025-04-01 13211/week @ 2025-04-08 12801/week @ 2025-04-15 16869/week @ 2025-04-22 20336/week @ 2025-04-29 21673/week @ 2025-05-06 16472/week @ 2025-05-13

77,690 downloads per month
Used in 75 crates (53 directly)

MIT license

18MB
566K SLoC

C 565K 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