4 releases

new 0.20.2 Jan 24, 2023
0.20.1 Mar 29, 2022
0.20.0 Oct 4, 2021
0.19.0 Mar 9, 2021

#306 in Parser implementations

Download history 1291/week @ 2022-10-08 979/week @ 2022-10-15 990/week @ 2022-10-22 1064/week @ 2022-10-29 1639/week @ 2022-11-05 1081/week @ 2022-11-12 913/week @ 2022-11-19 1537/week @ 2022-11-26 1183/week @ 2022-12-03 1932/week @ 2022-12-10 2159/week @ 2022-12-17 1177/week @ 2022-12-24 1706/week @ 2022-12-31 2464/week @ 2023-01-07 2508/week @ 2023-01-14 2238/week @ 2023-01-21

9,034 downloads per month
Used in 9 crates (6 directly)

MIT license

13MB
432K SLoC

C 431K SLoC JavaScript 832 SLoC // 0.0% comments Scheme 43 SLoC // 0.1% comments Rust 37 SLoC

tree-sitter-typescript

Build Status Build status

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 the tsx parser.

References

Dependencies

~1.4–2MB
~52K SLoC