tsgencore

package
v0.83.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2026 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdHocType

type AdHocType struct {
	TypeInstance any
	TSTypeName   string
}

AdHocType represents a Go type that needs a TypeScript definition.

type IDStr

type IDStr = string

type Results

type Results struct {
	Types []*TypeInfo
	// contains filtered or unexported fields
}

Results holds the final, processed output of a generation pass.

func ProcessTypes

func ProcessTypes(adHocTypes []*AdHocType) Results

ProcessTypes is the main entry point. It takes a slice of ad-hoc types and returns the complete, resolved Results.

func (*Results) GetTypeInfo

func (r *Results) GetTypeInfo(adHocType *AdHocType) *TypeInfo

GetTypeInfo allows retrieving the information for a specific type from the final results.

type TSTyper

type TSTyper interface {
	TSType() map[string]string
}

TSTyper is an interface that a struct can implement to provide custom TypeScript type overrides.

type TypeInfo

type TypeInfo struct {
	OriginalName string
	ResolvedName string
	ReflectType  reflect.Type
	TSStr        string

	IsRoot         bool
	IsReferenced   bool
	UsedAsEmbedded bool
	// contains filtered or unexported fields
}

func (*TypeInfo) IsTSBasicType

func (t *TypeInfo) IsTSBasicType() bool

func (*TypeInfo) IsTSNull

func (t *TypeInfo) IsTSNull() bool

func (*TypeInfo) IsTSUnknown

func (t *TypeInfo) IsTSUnknown() bool

Jump to

Keyboard shortcuts

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