mirror of
https://github.com/tree-sitter/tree-sitter-typescript.git
synced 2025-12-05 22:47:11 +00:00
TypeScript grammar for tree-sitter
This is needed by the MIT license terms ``` ❯ cargo package --list | grep LICENSE LICENSE ``` Signed-off-by: Michel Lind <salimma@fedoraproject.org> |
||
|---|---|---|
| .github | ||
| bindings | ||
| common | ||
| examples | ||
| queries | ||
| test/corpus | ||
| tsx | ||
| typescript | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| binding.gyp | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CMakeLists.txt | ||
| eslint.config.mjs | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| package-lock.json | ||
| package.json | ||
| Package.resolved | ||
| Package.swift | ||
| pyproject.toml | ||
| README.md | ||
| setup.py | ||
| tree-sitter.json | ||
tree-sitter-typescript
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