Installation
npm install --save @types/jjv
Summary
This package contains type definitions for jjv (https://github.com/acornejo/jjv).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/jjv.
declare function jjv(): jjv.Env;
declare namespace jjv {
interface Errors {
validation: {
[property: string]: {
required?: boolean | undefined;
type?: string | undefined;
};
};
}
interface Options {
checkRequired?: boolean | undefined;
useDefault?: boolean | undefined;
useCoerce?: boolean | undefined;
removeAdditional?: boolean | undefined;
}
interface Env {
defaultOptions: Options;
addSchema(name: string, schema: Object): void;
addType(name: string, parse: (input: any) => any): void;
addFormat(name: string, parse: (input: any) => any): void;
addCheck(name: string, check: (input: any, comparator: any) => any): void;
addTypeCoercion(name: string, coerce: (input: any) => any): void;
validate(name: string, object: any, options?: Options): Errors;
validate(schema: Object, object: any, options?: Options): Errors;
}
}
export = jjv;
Additional Details
- Last updated: Tue, 07 Nov 2023 03:09:37 GMT
- Dependencies: none
Credits
These definitions were written by Wim Looman.