TypeScript grammar for tree-sitter
532
stars
566
commits
JavaScript
primary language
Aug 29, 2025
updated
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
(top 30 of 35)
JavaScript
68.5%
C
22.7%
Makefile
6.4%
Scheme
2.4%
TypeScript grammar for tree-sitter
532
stars
566
commits
JavaScript
primary language
Aug 29, 2025
updated
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
(top 30 of 35)
JavaScript
68.5%
C
22.7%
Makefile
6.4%
Scheme
2.4%