jaywalk
Version:
Runtime type validation
18 lines (17 loc) • 599 B
TypeScript
import { Any, AnyOptions } from './any';
import { Rule } from './rule';
import { Context } from '../utils';
export interface IntersectionOptions extends AnyOptions {
types: Rule[];
}
export declare class Intersection extends Any implements IntersectionOptions {
type: string;
types: Rule[];
_types: Rule[];
constructor(options: IntersectionOptions);
static flatten(schemas: Rule[]): Rule[];
static intersect(...schemas: Rule[]): Rule;
_isType(value: any, path: string[], context: Context): number;
_extend(options: any): IntersectionOptions;
toJSON(): any;
}