Prelude
The Prelude contains various utility types that is used in the rest parts of ot-builder
.
Namespace Data
Type Data.Maybe<T> = null | undefined | T.
Represents an optional object. Frequently used in the rest parts of the ot-builder
.
Interface Data.OrderStoreFactory<T,S extends Data.OrderStore<T>>
Methods
- createStoreFromList(init:Iterable<T>):S
Interface Data.OrderStoreFactoryWithDefault<T,S extends Data.OrderStore<T>>
Inherits
- Data.OrderStoreFactory<T,S>
Methods
- createStoreFromSize(count:number):S
Interface Data.OrderStore<T>
Methods
- decideOrder():Data.Order<T>
Interface Data.Order<T>
Properties
- readonly length:number
Methods
-
at(index:number):T
Get item at specific index. Should throw error when item is absent.
-
tryAt(index:number):Data.Maybe<T>
Get item at specific index. Return
undefined
when item is absent. - reverse(item:T):number
- tryReverse(index:T):Data.Maybe<number>
- tryReverseFallback<F>(index:T,fallback:F):number | F
- [Symbol.Iterator]():IterableIterator<T>
- entries():IterableIterator<[number,T]>
Interface Data.Naming.Source<G>
Methods
- getName(item:G):undefined | null | string
Interface Data.Naming.IndexSource<G>
Methods
- getIndex(item:G):undefined | null | number
- getVariantIndex(item:G):undefined | null | number[]
Namespace Sigma
Class Sigma.TypeID<T>
Constructor
- new Sigma.TypeID(id:string)
Class Sigma.DependentPair
Method
-
cast<T>(expected:Sigma.TypeID<T>):undefined | T
Query the corresponded value part of a Sigma.DependentPair. Return the value if the type ID parameter matches.
Factory Methods
- Sigma.DependentPair.create<T>(tid:Sigma.TypeID<T>,value:T):Sigma.DependentPair
Class Sigma.PropertyBag
Constructor
- new Sigma.PropertyBag()
Method
- get<T>(tid:Sigma.TypeID<T>):undefined | T
- set<T>(tid:Sigma.TypeID<T>,value:T):void
- delete<T>(tid:Sigma.TypeID<T>):void
- entries():IterableIterator<Sigma.DependentPair>