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

typescript

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: May 9, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package typescript provides TypeScript/JavaScript extraction for knowledge graphs.

Index

Constants

View Source
const (
	// Language is the canonical name for TypeScript.
	Language = "typescript"

	// NodePrefix is the prefix for all TypeScript node IDs.
	NodePrefix = "ts_"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Extractor

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

Extractor implements extract.LanguageExtractor for TypeScript source code.

func New

func New() *Extractor

New creates a new TypeScript extractor.

func (*Extractor) CanExtract

func (e *Extractor) CanExtract(path string) bool

CanExtract returns true for TypeScript/JavaScript files.

func (*Extractor) DetectFramework

func (e *Extractor) DetectFramework(path string) *provider.FrameworkInfo

DetectFramework returns framework information if detected.

func (*Extractor) Extensions

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

Extensions returns TypeScript/JavaScript file extensions.

func (*Extractor) ExtractFile

func (e *Extractor) ExtractFile(path, baseDir string) ([]*graph.Node, []*graph.Edge, error)

ExtractFile extracts nodes and edges from a single TypeScript file.

func (*Extractor) Language

func (e *Extractor) Language() string

Language returns "typescript".

Jump to

Keyboard shortcuts

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