Interface DiscriminatorSchema<K, M>

a schema for tagged unions of objects

interface DiscriminatorSchema<K, M> {
    discriminator: K;
    mapping: M;
    metadata?: unknown;
    nullable?: boolean;
}

Type Parameters

Properties

discriminator: K

the key for the discriminator in the type

mapping: M

a mapping of discriminator values to schemas

metadata?: unknown

optional metadata on a schema

nullable?: boolean

a key indicating if a type can be null