mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 15:00:26 +00:00
[joi] Add missing type to ObjectSchema::pattern() (#27152)
* added missing type to ObjectSchema::pattern() * changed version as requested by reviewer
This commit is contained in:
committed by
Ryan Cavanaugh
parent
d13bcd1497
commit
5fe390b1fa
Vendored
+5
-2
@@ -1,4 +1,4 @@
|
||||
// Type definitions for joi v13.3.0
|
||||
// Type definitions for joi v13.4.0
|
||||
// Project: https://github.com/hapijs/joi
|
||||
// Definitions by: Bart van der Schoor <https://github.com/Bartvds>
|
||||
// Laurence Dougal Myers <https://github.com/laurence-myers>
|
||||
@@ -753,8 +753,11 @@ export interface ObjectSchema extends AnySchema {
|
||||
|
||||
/**
|
||||
* Specify validation rules for unknown keys matching a pattern.
|
||||
*
|
||||
* @param pattern - a pattern that can be either a regular expression or a joi schema that will be tested against the unknown key names
|
||||
* @param schema - the schema object matching keys must validate against
|
||||
*/
|
||||
pattern(regex: RegExp, schema: SchemaLike): this;
|
||||
pattern(pattern: RegExp | SchemaLike, schema: SchemaLike): this;
|
||||
|
||||
/**
|
||||
* Defines an all-or-nothing relationship between keys where if one of the peers is present, all of them are required as well.
|
||||
|
||||
Reference in New Issue
Block a user