Help us shape the future of Go! Take the 2026 Go Developer Survey

typescript

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

func New

func New() *Parser

func (*Parser) IsSemanticInput

func (*Parser) IsSemanticInput(path string) bool

func (*Parser) Language

func (*Parser) Language() string

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, input parserapi.Input) (graph.ParseResult, error)

func (*Parser) ResolutionMetrics

func (p *Parser) ResolutionMetrics() ResolutionMetrics

func (*Parser) SemanticAffectedPaths

func (*Parser) SemanticAffectedPaths(_ string, allPaths, changedPaths []string) []string

SemanticAffectedPaths reparses every TypeScript module when the package or compiler manifests change, because those select module resolution repository wide. A module edit is not expanded here: anything in it that another module can resolve through already changes the workspace semantic key, and therefore every module's incremental cache key.

func (*Parser) Supports

func (*Parser) Supports(path string) bool

func (*Parser) WorkspaceSemanticEvidenceKey

func (*Parser) WorkspaceSemanticEvidenceKey(context.Context, parserapi.Input) (string, error)

func (*Parser) WorkspaceSemanticKey

func (p *Parser) WorkspaceSemanticKey(ctx context.Context, input parserapi.Input) (string, error)

WorkspaceSemanticKey fingerprints only the repository-wide TypeScript facts that change how an otherwise untouched module extracts: the package and compiler manifests in full, and the resolution surface - module identity, local declarations, and exports - of every tracked module. A statement body cannot change how another module resolves, so it is excluded.

type ResolutionMetrics

type ResolutionMetrics struct {
	CatalogLoads     int64 `json:"catalog_loads"`
	CacheHits        int64 `json:"cache_hits"`
	CachedModules    int64 `json:"cached_modules"`
	CacheEntries     int   `json:"cache_entries"`
	ExportDepthLimit int   `json:"export_depth_limit"`
}

Jump to

Keyboard shortcuts

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