Skip to content

Commit 38e7159

Browse files
michaelmiorjdesrosiers
authored andcommitted
Add additional type exports
Signed-off-by: Michael Mior <[email protected]>
1 parent cd1d9f3 commit 38e7159

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

draft-06/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ import type { Json } from "@hyperjump/json-pointer";
22
import type { JsonSchemaType } from "../lib/common.js";
33

44

5-
export type JsonSchemaDraft06 = boolean | {
5+
export type JsonSchemaDraft06Ref = {
66
$ref: string;
7-
} | {
7+
};
8+
export type JsonSchemaDraft06Object = {
89
$schema?: "http://json-schema.org/draft-06/schema#";
910
$id?: string;
1011
title?: string;
@@ -43,5 +44,6 @@ export type JsonSchemaDraft06 = boolean | {
4344
oneOf?: JsonSchemaDraft06[];
4445
not?: JsonSchemaDraft06;
4546
};
47+
export type JsonSchemaDraft06 = boolean | JsonSchemaDraft06Ref | JsonSchemaDraft06Object;
4648

4749
export * from "../lib/index.js";

draft-2019-09/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Json } from "@hyperjump/json-pointer";
22
import type { JsonSchemaType } from "../lib/common.js";
33

44

5-
export type JsonSchemaDraft201909 = boolean | {
5+
export type JsonSchemaDraft201909Object = {
66
$schema?: "https://json-schema.org/draft/2019-09/schema";
77
$id?: string;
88
$anchor?: string;
@@ -61,5 +61,6 @@ export type JsonSchemaDraft201909 = boolean | {
6161
contentEncoding?: string;
6262
contentSchema?: JsonSchemaDraft201909;
6363
};
64+
export type JsonSchemaDraft201909 = boolean | JsonSchemaDraft201909Object;
6465

6566
export * from "../lib/index.js";

draft-2020-12/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Json } from "@hyperjump/json-pointer";
22
import type { JsonSchemaType } from "../lib/common.js";
33

44

5-
export type JsonSchemaDraft202012 = boolean | {
5+
export type JsonSchemaDraft202012Object = {
66
$schema?: "https://json-schema.org/draft/2020-12/schema";
77
$id?: string;
88
$anchor?: string;
@@ -62,5 +62,6 @@ export type JsonSchemaDraft202012 = boolean | {
6262
contentEncoding?: string;
6363
contentSchema?: JsonSchemaDraft202012;
6464
};
65+
export type JsonSchemaDraft202012 = boolean | JsonSchemaDraft202012Object;
6566

6667
export * from "../lib/index.js";

stable/index.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import type { Json } from "@hyperjump/json-pointer";
22
import type { JsonSchemaType } from "../lib/common.js";
33

44

5+
export type JsonSchemaType = JsonSchemaType;
6+
57
export type JsonSchema = boolean | {
68
$schema?: "https://json-schema.org/validation";
79
$id?: string;

0 commit comments

Comments
 (0)