UNPKG

393 BTypeScriptView Raw
1import { Type } from './type';
2/**
3 * Union type, such as string | number
4 */
5export declare class UnionType implements Type<any> {
6 itemTypes: Type<any>[];
7 constructor(itemTypes: Type<any>[]);
8 readonly name = "union";
9 isInstance(value: any): boolean;
10 isCoercible(value: any): boolean;
11 defaultValue(): any;
12 coerce(value: any): any;
13 serialize(value: any): any;
14}