@jsonjoy.com/json-type
Version:
High-performance JSON Pointer implementation
18 lines (17 loc) • 678 B
TypeScript
import * as schema from '../../schema';
import type { SchemaOf, Type } from '../types';
import { AbsType } from './AbsType';
export declare class OrType<T extends Type[] = any> extends AbsType<schema.OrSchema<{
[K in keyof T]: SchemaOf<T[K]>;
}>> {
types: T;
constructor(types: T, options?: Omit<schema.OrSchema, 'kind' | 'type'>);
getSchema(): schema.OrSchema<{
[K in keyof T]: SchemaOf<T[K]>;
}>;
getOptions(): schema.Optional<schema.OrSchema<{
[K in keyof T]: SchemaOf<T[K]>;
}>>;
options(options: schema.Optional<schema.OrSchema> & Partial<Pick<schema.OrSchema, 'discriminator'>>): this;
toString(tab?: string): string;
}