Nominal
API Reference / privatefolio-backend / interfaces / Nominal
Nominal<
T,Name> =T&object
Defined in: interfaces.ts:331
This is the generic type useful for declaring a nominal type, which does not structurally matches with the base type and the other types declared over the same base type
Usage:
Type Declaration
Section titled “Type Declaration”[species]
Section titled “[species]”[species]:
Name
Type Parameters
Section titled “Type Parameters”T
Name extends string
Examples
Section titled “Examples”type Index = Nominal<number, 'Index'>;/ let i: Index = 42; / this fails to compilelet i: Index = 42 as Index; / OKtype TagName = Nominal<string, 'TagName'>;