diff --git a/lib/ajv.d.ts b/lib/ajv.d.ts index f42b34800b..cb600e168a 100644 --- a/lib/ajv.d.ts +++ b/lib/ajv.d.ts @@ -80,9 +80,9 @@ declare namespace ajv { /** * Get compiled schema from the instance by `key` or `ref`. * @param {string} keyRef `key` that was passed to `addSchema` or full schema reference (`schema.id` or resolved id). - * @return {Function} schema validating function (with property `schema`). + * @return {Function} schema validating function (with property `schema`). Returns undefined if keyRef can't be resolved to an existing schema. */ - getSchema(keyRef: string): ValidateFunction; + getSchema(keyRef: string): ValidateFunction | undefined; /** * Remove cached schema(s). * If no parameter is passed all schemas but meta-schemas are removed. @@ -169,7 +169,7 @@ declare namespace ajv { jsonPointers?: boolean; uniqueItems?: boolean; unicode?: boolean; - format?: string; + format?: false | string; formats?: object; keywords?: object; unknownFormats?: true | string[] | 'ignore'; diff --git a/package.json b/package.json index 6f15e2dd0f..5cfec97d2b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ajv", - "version": "6.10.2", + "version": "6.11.0", "description": "Another JSON Schema Validator", "main": "lib/ajv.js", "typings": "lib/ajv.d.ts", @@ -25,7 +25,7 @@ "build": "del-cli lib/dotjs/*.js \"!lib/dotjs/index.js\" && node scripts/compile-dots.js", "test-karma": "karma start", "test-browser": "del-cli .browser && npm run bundle && scripts/prepare-tests && npm run test-karma", - "test-all": "npm run test-ts && npm run test-cov && if-node-version 10 npm run test-browser", + "test-all": "npm run test-cov && if-node-version 10 npm run test-browser", "test": "npm run lint && npm run build && npm run test-all", "prepublish": "npm run build && npm run bundle", "watch": "watch \"npm run build\" ./lib/dot" @@ -87,8 +87,8 @@ "karma-chrome-launcher": "^3.0.0", "karma-mocha": "^1.1.1", "karma-sauce-launcher": "^2.0.0", - "mocha": "^6.0.0", - "nyc": "^14.0.0", + "mocha": "^7.0.1", + "nyc": "^15.0.0", "pre-commit": "^1.1.1", "require-globify": "^1.3.0", "typescript": "^2.8.3",