Skip to content

Commit 8e31ef3

Browse files
fix: compatibility with old types (#198)
1 parent 1478499 commit 8e31ef3

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

declarations/validate.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export type ExtendedSchema = {
1010
link?: string | undefined;
1111
undefinedAsNull?: boolean | undefined;
1212
};
13+
export type Extend = ExtendedSchema;
1314
export type Schema = (JSONSchema4 | JSONSchema6 | JSONSchema7) & ExtendedSchema;
1415
export type SchemaUtilErrorObject = ErrorObject & {
1516
children?: Array<ErrorObject>;

src/validate.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ const getAjv = memoize(() => {
5959
* @property {boolean=} undefinedAsNull
6060
*/
6161

62+
// TODO remove me in the next major release
63+
/** @typedef {ExtendedSchema} Extend */
64+
6265
/** @typedef {(JSONSchema4 | JSONSchema6 | JSONSchema7) & ExtendedSchema} Schema */
6366

6467
/** @typedef {ErrorObject & { children?: Array<ErrorObject> }} SchemaUtilErrorObject */

0 commit comments

Comments
 (0)