Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateTSContent ¶
func GenerateTSToFile ¶
GenerateTSToFile generates a TypeScript file from the provided Opts.
func StringUnion ¶
Types ¶
type ArbitraryProperty ¶
Anything you'd like to add to a TypeScript type object, other than the phantom types. Value must be JSON-serializable.
type CollectionItem ¶
CollectionItem 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 CollectionVarName in Opts.
type Statements ¶
type Statements [][2]string
func (*Statements) BuildString ¶
func (m *Statements) BuildString() string
func (*Statements) Enum ¶
func (m *Statements) Enum(constName, typeName string, enumStruct any) *Statements
func (*Statements) Raw ¶
func (m *Statements) Raw(prefix string, value string) *Statements
func (*Statements) Serialize ¶
func (m *Statements) Serialize(prefix string, value any) *Statements
type TSTyperRaw ¶
type TSTyperRaw interface {
TSTypeRaw() string
}
Click to show internal directories.
Click to hide internal directories.