ts-json-schema-generator
Version:
Generate JSON schema from your Typescript sources
14 lines (13 loc) • 462 B
TypeScript
import { BaseType } from "./BaseType.js";
export declare class UnionType extends BaseType {
private readonly types;
private discriminator?;
constructor(types: readonly BaseType[]);
setDiscriminator(discriminator: string): void;
getDiscriminator(): string | undefined;
getId(): string;
getName(): string;
getTypes(): BaseType[];
normalize(): BaseType;
getFlattenedTypes(deref?: (type: BaseType) => BaseType): BaseType[];
}