mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Merge pull request #32676 from wingsbob/joi-object-schema
[@types/joi] Add missing Joi object schema
This commit is contained in:
Vendored
+5
-1
@@ -488,7 +488,6 @@ export interface BooleanSchema extends AnySchema {
|
||||
/**
|
||||
* Allows the values provided to truthy and falsy as well as the "true" and "false" default conversion
|
||||
* (when not in strict() mode) to be matched in a case insensitive manner.
|
||||
* @param enabled
|
||||
*/
|
||||
insensitive(enabled?: boolean): this;
|
||||
}
|
||||
@@ -792,6 +791,11 @@ export interface ObjectSchema extends AnySchema {
|
||||
*/
|
||||
length(limit: number): this;
|
||||
|
||||
/**
|
||||
* Requires the object to be a Joi schema instance.
|
||||
*/
|
||||
schema(): this;
|
||||
|
||||
/**
|
||||
* Specify validation rules for unknown keys matching a pattern.
|
||||
*
|
||||
|
||||
@@ -706,6 +706,8 @@ objSchema = objSchema.nand(str, str);
|
||||
objSchema = objSchema.nand(str, str, str);
|
||||
objSchema = objSchema.nand(strArr);
|
||||
|
||||
objSchema = objSchema.schema();
|
||||
|
||||
objSchema = objSchema.or(str);
|
||||
objSchema = objSchema.or(str, str);
|
||||
objSchema = objSchema.or(str, str, str);
|
||||
|
||||
Reference in New Issue
Block a user