typescript

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package typescript implements a v0.3 TypeScript extractor backed by tree-sitter. Scope is intentionally narrow: identifier-level declarations (functions, classes, methods, interfaces, types, fields, exports, imports). Cross-file type resolution and IMPLEMENTS edges are deferred to v0.4+ (would require tsserver-equivalent capability).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

type Extractor struct{}

Extractor implements extract.RepoExtractor for TypeScript.

func New

func New() *Extractor

New constructs a TypeScript extractor.

func (*Extractor) Extensions

func (e *Extractor) Extensions() []string

func (*Extractor) Extract

func (e *Extractor) Extract(_ context.Context, _ string, _ []byte) ([]core.Symbol, []core.Edge, error)

Extract is the per-file API; v0.3 doesn't use it directly.

func (*Extractor) ExtractRepo

func (e *Extractor) ExtractRepo(ctx context.Context, root string) ([]core.Symbol, []core.Edge, error)

ExtractRepo walks all .ts/.tsx files under root, honoring the cross- extractor scope filter.

func (*Extractor) FQN

func (e *Extractor) FQN(_ context.Context, file string, scopePath []string, name string) core.FQN

FQN format for TypeScript (FOUNDATION §13 family):

<repo-relative-path>:<scopePath>.<name>

func (*Extractor) Language

func (e *Extractor) Language() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL