tgtt

package
v0.4.6 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MPL-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TranspileExpr added in v0.4.5

func TranspileExpr(x string) (string, error)

Types

type BadExprError added in v0.4.6

type BadExprError struct {
	From, To token.Pos
}

func (*BadExprError) Error added in v0.4.6

func (e *BadExprError) Error() string

type Module

type Module struct {
	GoPath  string
	Imports *orderedmap.OrderedMap[string, *Module] // Keyed by module name
	Defs    *orderedmap.OrderedMap[string, string]
}

func (*Module) Render added in v0.4.5

func (m *Module) Render() []byte

type Package added in v0.4.5

type Package map[string]*Module // Keyed by module name

func Transpile added in v0.3.0

func Transpile(opts TranspileOptions) (Package, error)

func (Package) Index added in v0.4.5

func (p Package) Index() *Module

func (Package) Render added in v0.4.5

func (p Package) Render(opts RenderOptions) error

type PackageOptions added in v0.3.0

type PackageOptions struct {
	Path  string          `json:"path" jsonschema:"required,minLength=1"`
	Names set.Set[string] `json:"names"`
}

type RenderOptions added in v0.4.5

type RenderOptions struct {
	Limit int
	Write func(moduleName string, data []byte) error
}

type TranspileOptions added in v0.3.0

type TranspileOptions struct {
	PrimaryPackage    PackageOptions
	SecondaryPackages []PackageOptions
	TypeMappings      map[string]string
	IncludeUnexported bool
	FallbackType      string
}

Jump to

Keyboard shortcuts

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