Give AlbumentationsX a star on GitHub — it powers this leaderboard

Star on GitHub

tree-sitter-typescript

TypeScript and TSX grammars for tree-sitter

Rank: #2272Downloads: 2,934,707 (30 days)Stars: 496Forks: 150

Description

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