Documentation
¶
Overview ¶
Package types contains structs/interfaces representing TypeScript types
Package types contains structs/interfaces representing TypeScript types
Package types contains structs/interfaces representing TypeScript types
Package types contains structs/interfaces representing TypeScript types
Package types contains structs/interfaces representing TypeScript types
Package types contains structs/interfaces representing TypeScript types
Package types contains structs/interfaces representing TypeScript types
Package types contains structs/interfaces representing TypeScript types
Package types contains structs/interfaces representing TypeScript types
Package types contains structs/interfaces representing TypeScript types
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Any ¶
type Any struct{}
Any - any in TypeScript
func (*Any) UsedAsMapKey ¶
UsedAsMapKey returns whether this type can be used as the key for map
type Array ¶
type Array struct {
Inner Type
}
Array - array in TypeScript
func (*Array) UsedAsMapKey ¶
UsedAsMapKey returns whether this type can be used as the key for map
type Boolean ¶
type Boolean struct {
}
Boolean - boolean in TypeScript
func (*Boolean) UsedAsMapKey ¶
UsedAsMapKey returns whether this type can be used as the key for map
type Date ¶
type Date struct {
}
Date - RFC3399 string in TypeScript
func (*Date) UsedAsMapKey ¶
UsedAsMapKey returns whether this type can be used as the key for map
type Enumerable ¶
type Enumerable interface {
Type
// AddCandidates adds a candidate for enum
AddCandidates(key string, v interface{})
}
Enumerable interface represents union types
type Map ¶
Map - {[key: ...]: ...} in TypeScript
func (*Map) UsedAsMapKey ¶
UsedAsMapKey returns whether this type can be used as the key for map
type Nullable ¶
type Nullable struct {
Inner Type
}
Nullable - ... | null
func (*Nullable) UsedAsMapKey ¶
UsedAsMapKey returns whether this type can be used as the key for map
type Number ¶
type Number struct {
Name string
RawType types.BasicKind
Enum []int64
RawEnum []RawNumberEnumCandidate
}
Number - number in TypeScript
func (*Number) AddCandidates ¶
AddCandidates adds an candidate for enum
func (*Number) UsedAsMapKey ¶
UsedAsMapKey returns whether this type can be used as the key for map
type Object ¶
type Object struct {
Name string
Entries map[string]ObjectEntry
}
Object - {field1: ..., field2: ...} in TypeScript
func (*Object) UsedAsMapKey ¶
UsedAsMapKey returns whether this type can be used as the key for map
type ObjectEntry ¶
ObjectEntry is an field in objects
type RawNumberEnumCandidate ¶ added in v1.0.5
type RawNumberEnumCandidate struct {
Key string
Value interface{}
}
RawNumberEnumCandidate represents a raw candidate for number enum
type RawStringEnumCandidate ¶ added in v1.0.5
RawStringEnumCandidate represents a raw candidate for string enum
type String ¶
type String struct {
Name string
Enum []string
RawEnum []RawStringEnumCandidate
}
String - string in TypeScript
func (*String) AddCandidates ¶
AddCandidates adds an candidate for enum
func (*String) UsedAsMapKey ¶
UsedAsMapKey returns whether this type can be used as the key for map