diff options
Diffstat (limited to 'tools/eslint/node_modules/ajv/lib/ajv.d.ts')
-rw-r--r-- | tools/eslint/node_modules/ajv/lib/ajv.d.ts | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/eslint/node_modules/ajv/lib/ajv.d.ts b/tools/eslint/node_modules/ajv/lib/ajv.d.ts index 60cd2775b6..b687f78147 100644 --- a/tools/eslint/node_modules/ajv/lib/ajv.d.ts +++ b/tools/eslint/node_modules/ajv/lib/ajv.d.ts @@ -36,15 +36,17 @@ declare namespace ajv { * Adds schema to the instance. * @param {Object|Array} schema schema or array of schemas. If array is passed, `key` and other parameters will be ignored. * @param {String} key Optional schema key. Can be passed to `validate` method instead of schema object or id/ref. One schema per instance can have empty `id` and `key`. + * @return {Ajv} this for method chaining */ - addSchema(schema: Array<Object> | Object, key?: string): void; + addSchema(schema: Array<Object> | Object, key?: string): Ajv; /** * Add schema that will be used to validate other schemas * options in META_IGNORE_OPTIONS are alway set to false * @param {Object} schema schema object * @param {String} key optional schema key + * @return {Ajv} this for method chaining */ - addMetaSchema(schema: Object, key?: string): void; + addMetaSchema(schema: Object, key?: string): Ajv; /** * Validate schema * @param {Object|Boolean} schema schema to validate @@ -63,21 +65,24 @@ declare namespace ajv { * If RegExp is passed all schemas with key/id matching pattern but meta-schemas are removed. * Even if schema is referenced by other schemas it still can be removed as other schemas have local references. * @param {String|Object|RegExp|Boolean} schemaKeyRef key, ref, pattern to match key/ref or schema object + * @return {Ajv} this for method chaining */ - removeSchema(schemaKeyRef?: Object | string | RegExp | boolean): void; + removeSchema(schemaKeyRef?: Object | string | RegExp | boolean): Ajv; /** * Add custom format * @param {String} name format name * @param {String|RegExp|Function} format string is converted to RegExp; function should return boolean (true when valid) + * @return {Ajv} this for method chaining */ - addFormat(name: string, format: FormatValidator | FormatDefinition): void; + addFormat(name: string, format: FormatValidator | FormatDefinition): Ajv; /** * Define custom keyword * @this Ajv * @param {String} keyword custom keyword, should be a valid identifier, should be different from all standard, custom and macro keywords. * @param {Object} definition keyword definition object with properties `type` (type(s) which the keyword applies to), `validate` or `compile`. + * @return {Ajv} this for method chaining */ - addKeyword(keyword: string, definition: KeywordDefinition): void; + addKeyword(keyword: string, definition: KeywordDefinition): Ajv; /** * Get keyword definition * @this Ajv @@ -89,8 +94,9 @@ declare namespace ajv { * Remove keyword * @this Ajv * @param {String} keyword pre-defined or custom keyword. + * @return {Ajv} this for method chaining */ - removeKeyword(keyword: string): void; + removeKeyword(keyword: string): Ajv; /** * Convert array of error message objects to string * @param {Array<Object>} errors optional array of validation errors, if not passed errors from the instance are used. |