Skip to main content

TypeScript indexer plugin for CodeMap (https://github.com/qxbyte/codemap)

Project description

codemap-typescript

A TypeScript / TSX indexer for CodeMap, distributed as an independent PyPI package.

What this package proves

Adding a new language to CodeMap doesn't require touching the main repository. This package implements the codemap.indexers.base.Indexer Protocol against *.ts / *.tsx files and registers through the codemap.indexers entry-point group. Once installed it appears in codemap doctor next to the built-in indexers, on completely equal footing (ADR-004 + ADR-L001).

$ pip install codemap-typescript
$ codemap doctor
Registered indexers
┏━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ name          ┃ version ┃ languages  ┃ file_patterns ┃
┡━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ _example_lang │ 0.1.0   │ example    │ *.example     │
│ python        │ 0.1.0   │ python     │ *.py, *.pyi   │
│ typescript    │ 0.1.0   │ typescript │ *.ts, *.tsx   │
└───────────────┴─────────┴────────────┴───────────────┘

codemap.indexers.disabled: ["typescript"] in .codemap/config.yaml turns it off without uninstalling.

What it captures

Backed by tree-sitter-typescript. Single-file, no cross-file type inference (MVP):

AST node Symbol kind SymbolID descriptor
function_declaration function <path>/name().
class_declaration class <path>/Cls#
interface_declaration interface <path>/Cls#
method_definition (inside class) method <path>/Cls#name().
lexical_declaration (top-level const/let) variable <path>/Name.

Edges:

  • import_statement / import_from_clauseimports to a synthetic module symbol (consumed by the same bridges the Python indexer drives).

The matcher is intentionally lean — class inheritance, generic constraints, and decorators are not yet captured. The point is that they can be: a v0.2.0 PR to this repository is enough to extend coverage, the main CodeMap repository stays untouched.

SymbolID encoding

scip-typescript . . . src/app/Service.ts/UserService#login().
└──────────────┘ └──────────────────────────────────┘
     scheme               file → namespaces / type / method

Tests

pip install -e ".[dev]"
pytest

Limits / next steps

  • No cross-file import resolution. The main python_cross_module bridge has a sibling for Python; a typescript_cross_module bridge could be added in a future release.
  • No JSX-specific patterns (component declarations) yet.
  • interface_declaration is captured as class kind — CodeMap's symbol schema doesn't yet have a distinct interface kind, see design §3.3.

License

MIT — same as the host project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codemap_typescript-0.3.5.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codemap_typescript-0.3.5-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file codemap_typescript-0.3.5.tar.gz.

File metadata

  • Download URL: codemap_typescript-0.3.5.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codemap_typescript-0.3.5.tar.gz
Algorithm Hash digest
SHA256 fa1c9ef22f60b1abb5be4b10849fd7b104ef7d63c63e45f46b30129e74d4a300
MD5 7f494c377326d68287189a7db732ffa1
BLAKE2b-256 f9561dedbddfe451aaa468a6471f1e78fc1b41be1fe4ad84b8f55ef89faa5665

See more details on using hashes here.

Provenance

The following attestation bundles were made for codemap_typescript-0.3.5.tar.gz:

Publisher: publish.yml on qxbyte/codemap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file codemap_typescript-0.3.5-py3-none-any.whl.

File metadata

File hashes

Hashes for codemap_typescript-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c0f61f4fb07a1834edd878de5174541892b8b837a12c3b0114c1b60a1e99ab48
MD5 381eda4d011cf2214f9f3e1b7cd38e04
BLAKE2b-256 0a9daf9a23b31f65b1a6b8ffb9c3983ed736c1c8bdde931b134414e8b3d8a515

See more details on using hashes here.

Provenance

The following attestation bundles were made for codemap_typescript-0.3.5-py3-none-any.whl:

Publisher: publish.yml on qxbyte/codemap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page