jaywalk
Version:
Runtime type validation
15 lines (14 loc) • 460 B
TypeScript
import { Any, AnyOptions } from './any';
import { Rule } from './rule';
import { Context } from '../utils';
export interface UnionOptions extends AnyOptions {
types: Rule[];
}
export declare class Union extends Any implements UnionOptions {
type: string;
types: Rule[];
constructor(options: UnionOptions);
_extend(options: UnionOptions): UnionOptions;
_isType(value: any, path: string[], context: Context): number;
toJSON(): any;
}