From ba3bc9b78ef32c456d0e664219f925ff7fe27106 Mon Sep 17 00:00:00 2001 From: alexander-akait Date: Tue, 22 Apr 2025 20:42:21 +0300 Subject: [PATCH] fix: compatibility with old types --- declarations/validate.d.ts | 1 + src/validate.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/declarations/validate.d.ts b/declarations/validate.d.ts index 5ed73b2..6e4eec4 100644 --- a/declarations/validate.d.ts +++ b/declarations/validate.d.ts @@ -10,6 +10,7 @@ export type ExtendedSchema = { link?: string | undefined; undefinedAsNull?: boolean | undefined; }; +export type Extend = ExtendedSchema; export type Schema = (JSONSchema4 | JSONSchema6 | JSONSchema7) & ExtendedSchema; export type SchemaUtilErrorObject = ErrorObject & { children?: Array; diff --git a/src/validate.js b/src/validate.js index 3b0cb38..7a40e06 100644 --- a/src/validate.js +++ b/src/validate.js @@ -59,6 +59,9 @@ const getAjv = memoize(() => { * @property {boolean=} undefinedAsNull */ +// TODO remove me in the next major release +/** @typedef {ExtendedSchema} Extend */ + /** @typedef {(JSONSchema4 | JSONSchema6 | JSONSchema7) & ExtendedSchema} Schema */ /** @typedef {ErrorObject & { children?: Array }} SchemaUtilErrorObject */