Crates.io | tree-sitter-typescript |
lib.rs | tree-sitter-typescript |
version | 0.23.0 |
source | src |
created_at | 2021-03-09 17:42:54.001957 |
updated_at | 2024-09-02 21:15:26.306457 |
description | TypeScript and TSX grammars for tree-sitter |
homepage | |
repository | https://github.com/tree-sitter/tree-sitter-typescript |
max_upload_size | |
id | 366430 |
size | 18,569,177 |
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