diff --git a/jsen/jsen-tests.ts b/jsen/jsen-tests.ts index 8504c0279..54dbd8ae9 100644 --- a/jsen/jsen-tests.ts +++ b/jsen/jsen-tests.ts @@ -2261,7 +2261,7 @@ const doesNotThrow = (func: Function) => { { let schema = { format: 'custom' }, callCount = 0, - options = { + options = { formats: { custom: () => { callCount++; @@ -2298,7 +2298,7 @@ const doesNotThrow = (func: Function) => { maximum: 10 }, callCount = 0, - options = { + options = { formats: { custom: () => { callCount++; @@ -2334,7 +2334,7 @@ const doesNotThrow = (func: Function) => { }, format: 'passwordsMatch' }, - options = { + options = { formats: { passwordsMatch: (obj: any) => { callCount++; diff --git a/jsen/jsen.d.ts b/jsen/jsen.d.ts index b70fdfd95..e230818b8 100644 --- a/jsen/jsen.d.ts +++ b/jsen/jsen.d.ts @@ -7,14 +7,14 @@ interface IJsenFormats { [key: string]: string | RegExp | Function; } -interface IJSenSettings { +interface IJsenSettings { missing$Ref?: boolean; greedy?: boolean; formats?: IJsenFormats; schemas?: any; } -interface IJsenBuildSettings extends IJSenSettings { +interface IJsenBuildSettings { copy?: boolean; additionalProperties?: boolean; } @@ -36,7 +36,7 @@ interface IJsenUnique { findIndex(array: any[], value: any, comparator: (obj1: any, obj2: any) => boolean): number; } interface IJsen { - (schema?: any, options?: IJSenSettings): IJsenValidator; + (schema?: any, options?: IJsenSettings): IJsenValidator; clone(data: any): any; equal(a: any, b: any): boolean; unique: IJsenUnique;