typescript

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package typescript provides AST-aware chunking for TypeScript and JavaScript source files using tree-sitter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chunker

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

Chunker implements AST-aware chunking for TypeScript/JavaScript files.

func NewChunker

func NewChunker(options chunking.ChunkOptions) *Chunker

NewChunker creates a new TypeScript chunker.

func (*Chunker) Chunk

func (c *Chunker) Chunk(ctx context.Context, filePath string) ([]chunking.Chunk, error)

Chunk parses a TypeScript/JavaScript source file and returns semantic code chunks.

func (*Chunker) Language

func (c *Chunker) Language() chunking.Language

Language returns the language this chunker supports.

func (*Chunker) SupportedExtensions

func (c *Chunker) SupportedExtensions() []string

SupportedExtensions returns the file extensions this chunker handles.

Jump to

Keyboard shortcuts

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