jaywalk
Version:
Runtime type validation
12 lines (11 loc) • 629 B
TypeScript
import Promise = require('any-promise');
import * as Types from './types/index';
import * as Formats from './formats/index';
import * as Parsers from './parsers/index';
import * as Utils from './utils';
export { Types, Formats, Parsers, Utils };
export declare function compile(rootSchema: Types.Rule): <T>(root: T) => Promise<T>;
export declare function assert(rootSchema: Types.Rule, root: any): number;
export declare function is(schema: Types.Rule, value: any): number;
export declare function bestSchema(schemas: Types.Rule[], value: any): Types.Rule;
export declare function bestValue(list: Array<[Types.Rule, any]>): any;