@types/joi
Advanced tools
Comparing version 13.4.2 to 13.4.3
@@ -1,2 +0,2 @@ | ||
// Type definitions for joi v13.4.0 | ||
// Type definitions for joi 13.4 | ||
// Project: https://github.com/hapijs/joi | ||
@@ -128,3 +128,3 @@ // Definitions by: Bart van der Schoor <https://github.com/Bartvds> | ||
export type GuidVersions = 'uuidv1' | 'uuidv2' | 'uuidv3' | 'uuidv4' | 'uuidv5' | ||
export type GuidVersions = 'uuidv1' | 'uuidv2' | 'uuidv3' | 'uuidv4' | 'uuidv5'; | ||
@@ -185,4 +185,4 @@ export interface GuidOptions { | ||
export interface IPOptions { | ||
version?: Array<string>; | ||
cidr?: string | ||
version?: string[]; | ||
cidr?: string; | ||
} | ||
@@ -241,3 +241,2 @@ | ||
export interface AnySchema extends JoiObject { | ||
schemaType?: Types | string; | ||
@@ -447,3 +446,2 @@ | ||
export interface BooleanSchema extends AnySchema { | ||
/** | ||
@@ -702,3 +700,5 @@ * Allows for additional values to be considered valid booleans by converting them to true during validation. | ||
* @param type - a joi schema object to validate against each array item in sequence order. type can be an array of values, or multiple values can be passed as individual arguments. | ||
* If a given type is .required() then there must be a matching item with the same index position in the array. Errors will contain the number of items that didn't match. Any unmatched item having a label will be mentioned explicitly. | ||
* If a given type is .required() then there must be a matching item with the same index position in the array. | ||
* Errors will contain the number of items that didn't match. | ||
* Any unmatched item having a label will be mentioned explicitly. | ||
*/ | ||
@@ -734,3 +734,2 @@ ordered(...types: SchemaLike[]): this; | ||
export interface ObjectSchema extends AnySchema { | ||
/** | ||
@@ -763,5 +762,5 @@ * Sets or extends the allowed object keys. | ||
* 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 | ||
* | ||
* @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 | ||
*/ | ||
@@ -894,3 +893,2 @@ pattern(pattern: RegExp | SchemaLike, schema: SchemaLike): this; | ||
export interface DateSchema extends AnySchema { | ||
/** | ||
@@ -938,3 +936,2 @@ * Specifies the oldest date allowed. | ||
export interface FunctionSchema extends AnySchema { | ||
/** | ||
@@ -973,3 +970,2 @@ * Specifies the arity of the function where: | ||
export interface LazySchema extends AnySchema { | ||
} | ||
@@ -995,3 +991,3 @@ | ||
createError(type: string, context: Context, state: State, options: ValidationOptions): Err; | ||
} | ||
}; | ||
@@ -1148,3 +1144,3 @@ export interface Rules<P extends object = any> { | ||
*/ | ||
export function extend(extension: Extension|Extension[], ...extensions: (Extension|Extension[])[]): any; | ||
export function extend(extension: Extension|Extension[], ...extensions: Array<Extension|Extension[]>): any; | ||
@@ -1175,4 +1171,4 @@ // --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- | ||
/** | ||
* Whitelists a value | ||
*/ | ||
* Whitelists a value | ||
*/ | ||
export function allow(value: any, ...values: any[]): Schema; | ||
@@ -1179,0 +1175,0 @@ export function allow(values: any[]): Schema; |
{ | ||
"name": "@types/joi", | ||
"version": "13.4.2", | ||
"version": "13.4.3", | ||
"description": "TypeScript definitions for joi", | ||
@@ -80,4 +80,4 @@ "license": "MIT", | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "4852840fd9d3df73e4db41021c7b3aef16c2dc461652e331308ef5ad28e7696d", | ||
"typesPublisherContentHash": "7492d13691654424a0474e24832b0e8db2b84d17fca1ec0dd242623cab6d2af7", | ||
"typeScriptVersion": "2.4" | ||
} |
@@ -11,3 +11,3 @@ # Installation | ||
Additional Details | ||
* Last updated: Fri, 10 Aug 2018 01:11:54 GMT | ||
* Last updated: Sat, 18 Aug 2018 20:31:33 GMT | ||
* Dependencies: none | ||
@@ -14,0 +14,0 @@ * Global values: none |
47549
1090