Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTSContent ¶ added in v0.0.50
GenerateTSContent generates TypeScript content from the given options
func GenerateTSToFile ¶ added in v0.0.50
GenerateTSToFile generates a TypeScript file from the provided Opts.
Types ¶
type ArbitraryProperty ¶ added in v0.0.50
Anything you'd like to add to a TypeScript type object, other than the phantom types. Value must be JSON-serializable.
type Item ¶ added in v0.0.50
type Item struct { ArbitraryProperties []ArbitraryProperty PhantomTypes []PhantomType }
Item represents a TypeScript object type with arbitrary properties and phantom types. It will be added to a constant array in the generated TypeScript file with the name assigned to ItemsArrayVarName in Opts.
type PhantomType ¶ added in v0.0.50
type Statements ¶ added in v0.0.65
type Statements [][2]string
func (*Statements) Enum ¶ added in v0.0.65
func (m *Statements) Enum(constName, typeName string, enumStruct any) *Statements
func (*Statements) Raw ¶ added in v0.0.65
func (m *Statements) Raw(prefix string, value string) *Statements
func (*Statements) Serialize ¶ added in v0.0.65
func (m *Statements) Serialize(prefix string, value any) *Statements
func (*Statements) String ¶ added in v0.0.65
func (m *Statements) String() string
Click to show internal directories.
Click to hide internal directories.