mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
Merge pull request #7320 from DavidBR-SW/Update_joi_typings
Updated optional flag on object.assert in Joi typings
This commit is contained in:
@@ -579,7 +579,9 @@ objSchema = objSchema.without(str, strArr);
|
||||
objSchema = objSchema.rename(str, str);
|
||||
objSchema = objSchema.rename(str, str, renOpts);
|
||||
|
||||
objSchema = objSchema.assert(str, schema);
|
||||
objSchema = objSchema.assert(str, schema, str);
|
||||
objSchema = objSchema.assert(ref, schema);
|
||||
objSchema = objSchema.assert(ref, schema, str);
|
||||
|
||||
objSchema = objSchema.unknown();
|
||||
|
||||
Vendored
+3
-3
@@ -1,6 +1,6 @@
|
||||
// Type definitions for joi v4.6.0
|
||||
// Project: https://github.com/spumko/joi
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Laurence Dougal Myers <https://github.com/laurence-myers>, Christopher Glantschnig <https://github.com/cglantschnig>
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>, Laurence Dougal Myers <https://github.com/laurence-myers>, Christopher Glantschnig <https://github.com/cglantschnig>, David Broder-Rodgers <https://github.com/DavidBR-SW>
|
||||
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
||||
|
||||
// TODO express type of Schema in a type-parameter (.default, .valid, .example etc)
|
||||
@@ -584,8 +584,8 @@ declare module 'joi' {
|
||||
/**
|
||||
* Verifies an assertion where.
|
||||
*/
|
||||
assert(ref: string, schema: Schema, message: string): ObjectSchema;
|
||||
assert(ref: Reference, schema: Schema, message: string): ObjectSchema;
|
||||
assert(ref: string, schema: Schema, message?: string): ObjectSchema;
|
||||
assert(ref: Reference, schema: Schema, message?: string): ObjectSchema;
|
||||
|
||||
/**
|
||||
* Overrides the handling of unknown keys for the scope of the current object only (does not apply to children).
|
||||
|
||||
Reference in New Issue
Block a user