mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
added missing type to ArraySchema::pattern()
This commit is contained in:
1
types/joi/index.d.ts
vendored
1
types/joi/index.d.ts
vendored
@@ -714,6 +714,7 @@ export interface ArraySchema extends AnySchema {
|
||||
* Specifies the exact number of items in the array.
|
||||
*/
|
||||
length(limit: number): this;
|
||||
length(limit: Reference): this;
|
||||
|
||||
/**
|
||||
* Requires the array values to be unique.
|
||||
|
||||
@@ -318,6 +318,7 @@ arrSchema = arrSchema.ordered([schemaMap, schemaMap, schemaLike]);
|
||||
arrSchema = arrSchema.min(num);
|
||||
arrSchema = arrSchema.max(num);
|
||||
arrSchema = arrSchema.length(num);
|
||||
arrSchema = arrSchema.length(ref);
|
||||
arrSchema = arrSchema.unique();
|
||||
arrSchema = arrSchema.unique((a, b) => a.test === b.test);
|
||||
arrSchema = arrSchema.unique('customer.id');
|
||||
|
||||
1
types/joi/v10/index.d.ts
vendored
1
types/joi/v10/index.d.ts
vendored
@@ -670,6 +670,7 @@ export interface ArraySchema extends AnySchema {
|
||||
* Specifies the exact number of items in the array.
|
||||
*/
|
||||
length(limit: number): this;
|
||||
length(limit: Reference): this;
|
||||
|
||||
/**
|
||||
* Requires the array values to be unique.
|
||||
|
||||
@@ -299,6 +299,7 @@ arrSchema = arrSchema.ordered([schemaMap, schemaMap, schemaLike]);
|
||||
arrSchema = arrSchema.min(num);
|
||||
arrSchema = arrSchema.max(num);
|
||||
arrSchema = arrSchema.length(num);
|
||||
arrSchema = arrSchema.length(ref);
|
||||
arrSchema = arrSchema.unique();
|
||||
arrSchema = arrSchema.unique((a, b) => a.test === b.test);
|
||||
arrSchema = arrSchema.unique('customer.id');
|
||||
|
||||
Reference in New Issue
Block a user