--- id: tree-sitter-typescript version: "0.23.2" license: MIT license_treatment: permissive maintenance: aging --- # tree-sitter-typescript — TypeScript and TSX grammars for tree-sitter License: permissive · Maintenance: aging · Downloads: 7.8M/mo ## What it is and what it does tree-sitter-typescript is a grammar module that plugs into the tree-sitter incremental parser framework, providing language definitions for TypeScript and TSX (TypeScript with JSX). It lets you parse TypeScript and TSX source code into syntax trees that can be queried and analyzed programmatically. The package ships as precompiled binaries for major platforms, reducing setup friction. You use this when you need to analyze, transform, or lint TypeScript code at the syntax level—building developer tools, linters, code generators, or IDE features. It's part of the tree-sitter ecosystem, which emphasizes speed and incremental updates; the grammar itself is maintained by the tree-sitter project and tracks the TypeScript language spec. Use it for: - Build a TypeScript linter or code analyzer that needs to walk the syntax tree. - Generate code transformations or refactoring tools for TypeScript projects. - Implement IDE features like symbol navigation or syntax highlighting for TypeScript. - Parse and analyze TypeScript codebases for metrics, complexity, or dependency extraction. - Create a code formatter or pretty-printer for TypeScript and TSX. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides TypeScript and TSX language grammars for tree-sitter, enabling incremental parsing and syntax tree generation for TypeScript and JSX code. Yes, if you are building tools that need to parse TypeScript or TSX and you are already using tree-sitter. The package is well-maintained within the tree-sitter ecosystem, has no known vulnerabilities, and provides prebuilt binaries for common platforms. Install friction is moderate but manageable. Not necessary if you only need basic TypeScript parsing or are using a different parsing framework. ## Install pip install tree-sitter-typescript uv add tree-sitter-typescript poetry add tree-sitter-typescript ## Installing tree-sitter-typescript Before you install: Medium install friction due to compiled binary wheels; prebuilt wheels available for common platforms (macOS x86_64/arm64, Linux x86_64/aarch64, Windows). Last release was 641 days ago; repository is active but aging. License in practice: MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions. Quickstart: pip install tree-sitter-typescript from tree_sitter_typescript import get_language lang = get_language('typescript') # or for TSX: lang = get_language('tsx') Requires Python >=3.9 and a tree-sitter parser instance to work with; this package provides only the grammar, not the parser itself. Verify before relying: - Whether tree-sitter core library is a runtime dependency (not listed in friction evidence but likely required to use the grammar). - Performance characteristics for large codebases or real-time parsing scenarios. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: aging - Downloads: 7.8M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags typescript parser tree-sitter, tsx grammar parsing, incremental typescript parsing, tree-sitter language grammar, typescript ast generation, jsx syntax tree, typescript code analysis, parsing, typescript, syntax-tree [View on SkillFed](https://skillfed.io/packages/tree-sitter-typescript) · [View on PyPI](https://pypi.org/project/tree-sitter-typescript/)