wrap
wrap<
K,T>(): (value) =>Brand<K,T>
Defined in: Types/Brand.ts:38
Returns a constructor that wraps a value of type T in brand K. The resulting function performs an unchecked cast — only use when the raw value is known to satisfy the brand’s invariants.
Type Parameters
Section titled “Type Parameters”K extends string
T
Returns
Section titled “Returns”(
value):Brand<K,T>
Parameters
Section titled “Parameters”T
Returns
Section titled “Returns”Brand<K, T>