@tsed/schema
Version:
JsonSchema module for Ts.ED Framework
19 lines (18 loc) • 631 B
TypeScript
import { Type } from "@tsed/core";
export declare class Discriminator {
propertyName: string;
base: Type<any>;
values: Map<string, Type>;
types: Map<Type, string[]>;
constructor({ base, propertyName, types, values }?: Partial<{
base: Type<any>;
propertyName: string;
values: Map<string, Type<any>>;
types: Map<Type, string[]>;
}>);
add(type: Type<string>, values: string[]): this;
getType(discriminatorValue: string): Type<any>;
getValues(type: Type): string[] | undefined;
getDefaultValue(type: Type<any>): string | undefined;
children(): Type<any>[];
}