Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tree-sitter/tree-sitter-typescript
TypeScript grammar for tree-sitter
https://github.com/tree-sitter/tree-sitter-typescript
parser tree-sitter typescript
Last synced: about 1 month ago
JSON representation
TypeScript grammar for tree-sitter
- Host: GitHub
- URL: https://github.com/tree-sitter/tree-sitter-typescript
- Owner: tree-sitter
- License: mit
- Created: 2017-02-10T00:17:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-09-02T21:15:07.000Z (2 months ago)
- Last Synced: 2024-10-07T04:03:08.492Z (about 1 month ago)
- Topics: parser, tree-sitter, typescript
- Language: JavaScript
- Homepage:
- Size: 138 MB
- Stars: 360
- Watchers: 13
- Forks: 108
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tree-sitter - TypeScript
README
# tree-sitter-typescript
[![CI][ci]](https://github.com/tree-sitter/tree-sitter-typescript/actions/workflows/ci.yml)
[![discord][discord]](https://discord.gg/w7nTvsVJhm)
[![matrix][matrix]](https://matrix.to/#/#tree-sitter-chat:matrix.org)
[![crates][crates]](https://crates.io/crates/tree-sitter-typescript)
[![npm][npm]](https://www.npmjs.com/package/tree-sitter-typescript)
[![pypi][pypi]](https://pypi.org/project/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:
```js
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.
[tree-sitter]: https://github.com/tree-sitter/tree-sitter
[flow]: https://flow.org/en/References
- [TypeScript Language Spec](https://github.com/microsoft/TypeScript/blob/main/doc/spec-ARCHIVED.md)
[ci]: https://img.shields.io/github/actions/workflow/status/tree-sitter/tree-sitter-typescript/ci.yml?logo=github&label=CI
[discord]: https://img.shields.io/discord/1063097320771698699?logo=discord&label=discord
[matrix]: https://img.shields.io/matrix/tree-sitter-chat%3Amatrix.org?logo=matrix&label=matrix
[npm]: https://img.shields.io/npm/v/tree-sitter-typescript?logo=npm
[crates]: https://img.shields.io/crates/v/tree-sitter-typescript?logo=rust
[pypi]: https://img.shields.io/pypi/v/tree-sitter-typescript?logo=pypi&logoColor=ffd242