@fgv/ts-json-base 5.1.0-33 → 5.1.0-35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.browser.js +2 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/packlets/json-schema-builder/factories.js +342 -0
- package/dist/packlets/json-schema-builder/factories.js.map +1 -0
- package/dist/packlets/json-schema-builder/fromJson.js +371 -0
- package/dist/packlets/json-schema-builder/fromJson.js.map +1 -0
- package/dist/packlets/json-schema-builder/index.js +36 -0
- package/dist/packlets/json-schema-builder/index.js.map +1 -0
- package/dist/packlets/json-schema-builder/types.js +23 -0
- package/dist/packlets/json-schema-builder/types.js.map +1 -0
- package/dist/ts-json-base.d.ts +345 -6
- package/lib/index.browser.d.ts +2 -1
- package/lib/index.browser.d.ts.map +1 -1
- package/lib/index.browser.js +3 -1
- package/lib/index.browser.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/packlets/json-schema-builder/factories.d.ts +95 -0
- package/lib/packlets/json-schema-builder/factories.d.ts.map +1 -0
- package/lib/packlets/json-schema-builder/factories.js +352 -0
- package/lib/packlets/json-schema-builder/factories.js.map +1 -0
- package/lib/packlets/json-schema-builder/fromJson.d.ts +45 -0
- package/lib/packlets/json-schema-builder/fromJson.d.ts.map +1 -0
- package/lib/packlets/json-schema-builder/fromJson.js +375 -0
- package/lib/packlets/json-schema-builder/fromJson.js.map +1 -0
- package/lib/packlets/json-schema-builder/index.d.ts +15 -0
- package/lib/packlets/json-schema-builder/index.d.ts.map +1 -0
- package/lib/packlets/json-schema-builder/index.js +52 -0
- package/lib/packlets/json-schema-builder/index.js.map +1 -0
- package/lib/packlets/json-schema-builder/types.d.ts +142 -0
- package/lib/packlets/json-schema-builder/types.d.ts.map +1 -0
- package/lib/packlets/json-schema-builder/types.js +24 -0
- package/lib/packlets/json-schema-builder/types.js.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import { Validator } from '@fgv/ts-utils';
|
|
2
|
+
import { JsonObject } from '../json';
|
|
3
|
+
/**
|
|
4
|
+
* Discriminant tag carried by every schema node.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export type SchemaNodeType = 'string' | 'number' | 'integer' | 'boolean' | 'enum' | 'optional' | 'array' | 'object';
|
|
8
|
+
/**
|
|
9
|
+
* A typed JSON Schema node for the LLM-tool subset. Every value returned by the
|
|
10
|
+
* schema factories implements this interface — it IS a `Validator<T>` and also
|
|
11
|
+
* carries a `toJson()` method for wire-format emission.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* The `__staticType` property is a phantom: it exists only in the type system to carry
|
|
15
|
+
* the derived static type `T` and is never assigned at runtime (declared optional so
|
|
16
|
+
* factory return values need not populate it). `Static<S>` reads this slot to recover
|
|
17
|
+
* `T` from a schema value without requiring a user-supplied type assertion. A plain
|
|
18
|
+
* optional property is used rather than a module-private `unique symbol` because this is
|
|
19
|
+
* a published package surface — a private-symbol-keyed property cannot be named in the
|
|
20
|
+
* emitted `.d.ts` (TypeBox issue #679), which would break declaration emission and API
|
|
21
|
+
* Extractor for downstream consumers.
|
|
22
|
+
*
|
|
23
|
+
* Consumers call `schema.validate(input)` directly; no separate adapter step is required.
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
export interface ISchemaValidator<T> extends Validator<T> {
|
|
27
|
+
/**
|
|
28
|
+
* Phantom type carrier — type-level only, never present at runtime.
|
|
29
|
+
*/
|
|
30
|
+
readonly __staticType?: T;
|
|
31
|
+
/**
|
|
32
|
+
* Runtime discriminant. Identifies the schema node kind.
|
|
33
|
+
*/
|
|
34
|
+
readonly _type: SchemaNodeType;
|
|
35
|
+
/**
|
|
36
|
+
* Optional human-readable description emitted into the wire JSON Schema.
|
|
37
|
+
*/
|
|
38
|
+
readonly description?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Emits the standard JSON Schema (draft-07 LLM-tool subset) wire form for this schema.
|
|
41
|
+
* @returns The JSON Schema object describing this schema node.
|
|
42
|
+
*/
|
|
43
|
+
toJson(): JsonObject;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Recover the derived static type `T` from a schema value.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
* `Static<typeof MySchema>` resolves to the TypeScript type that `schema.validate()` produces
|
|
50
|
+
* and that `schema.toJson()` describes — derived, never asserted. No user-supplied `T` is ever
|
|
51
|
+
* required.
|
|
52
|
+
* @public
|
|
53
|
+
*/
|
|
54
|
+
export type Static<S extends ISchemaValidator<unknown>> = S extends ISchemaValidator<infer T> ? T : never;
|
|
55
|
+
/**
|
|
56
|
+
* A record of property schemas, as accepted by the `object` factory.
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
export type ILlmProperties = Record<string, ISchemaValidator<unknown>>;
|
|
60
|
+
/**
|
|
61
|
+
* The keys of `P` whose schemas are optional (wrapped with the `optional` modifier).
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
64
|
+
export type OptionalKeys<P extends ILlmProperties> = {
|
|
65
|
+
[K in keyof P]: P[K] extends ISchemaValidator<infer U> ? (undefined extends U ? K : never) : never;
|
|
66
|
+
}[keyof P];
|
|
67
|
+
/**
|
|
68
|
+
* The keys of `P` whose schemas are required (i.e. not optional).
|
|
69
|
+
* @public
|
|
70
|
+
*/
|
|
71
|
+
export type RequiredKeys<P extends ILlmProperties> = Exclude<keyof P, OptionalKeys<P>>;
|
|
72
|
+
/**
|
|
73
|
+
* The static value type carried by an optional property (the inner schema's static type,
|
|
74
|
+
* without the `| undefined` that optionality adds — the `?` modifier conveys that separately).
|
|
75
|
+
* @public
|
|
76
|
+
*/
|
|
77
|
+
export type OptionalPropertyStatic<V> = V extends ISchemaValidator<infer U> ? Exclude<U, undefined> : never;
|
|
78
|
+
/**
|
|
79
|
+
* Flattens an intersection of object types into a single object type for readable derived types.
|
|
80
|
+
* @public
|
|
81
|
+
*/
|
|
82
|
+
export type Simplify<T> = {
|
|
83
|
+
[K in keyof T]: T[K];
|
|
84
|
+
} & {};
|
|
85
|
+
/**
|
|
86
|
+
* The derived static type for an object built from properties `P`: required keys carry their
|
|
87
|
+
* static type directly, optional keys carry theirs under a `?` modifier.
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
export type ObjectStatic<P extends ILlmProperties> = Simplify<{
|
|
91
|
+
[K in RequiredKeys<P>]: Static<P[K]>;
|
|
92
|
+
} & {
|
|
93
|
+
[K in OptionalKeys<P>]?: OptionalPropertyStatic<P[K]>;
|
|
94
|
+
}>;
|
|
95
|
+
/**
|
|
96
|
+
* @deprecated Use `ISchemaValidator` instead.
|
|
97
|
+
* @public
|
|
98
|
+
*/
|
|
99
|
+
export type ILlmSchema<T> = ISchemaValidator<T>;
|
|
100
|
+
/**
|
|
101
|
+
* Schema node for a JSON `string`.
|
|
102
|
+
* @deprecated Use `ISchemaValidator` instead.
|
|
103
|
+
* @public
|
|
104
|
+
*/
|
|
105
|
+
export type ILlmStringSchema = ISchemaValidator<string>;
|
|
106
|
+
/**
|
|
107
|
+
* Schema node for a JSON `number` or `integer`.
|
|
108
|
+
* @deprecated Use `ISchemaValidator` instead.
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
export type ILlmNumberSchema = ISchemaValidator<number>;
|
|
112
|
+
/**
|
|
113
|
+
* Schema node for a JSON `boolean`.
|
|
114
|
+
* @deprecated Use `ISchemaValidator` instead.
|
|
115
|
+
* @public
|
|
116
|
+
*/
|
|
117
|
+
export type ILlmBooleanSchema = ISchemaValidator<boolean>;
|
|
118
|
+
/**
|
|
119
|
+
* Schema node for a closed set of string literals (`enum`).
|
|
120
|
+
* @deprecated Use `ISchemaValidator` instead.
|
|
121
|
+
* @public
|
|
122
|
+
*/
|
|
123
|
+
export type ILlmEnumSchema<T extends string> = ISchemaValidator<T>;
|
|
124
|
+
/**
|
|
125
|
+
* Wrapper marking a property as optional within an object schema.
|
|
126
|
+
* @deprecated Use `ISchemaValidator` instead.
|
|
127
|
+
* @public
|
|
128
|
+
*/
|
|
129
|
+
export type ILlmOptional<S extends ISchemaValidator<unknown>> = ISchemaValidator<Static<S> | undefined>;
|
|
130
|
+
/**
|
|
131
|
+
* Schema node for a JSON `array`.
|
|
132
|
+
* @deprecated Use `ISchemaValidator` instead.
|
|
133
|
+
* @public
|
|
134
|
+
*/
|
|
135
|
+
export type ILlmArraySchema<S extends ISchemaValidator<unknown>> = ISchemaValidator<Static<S>[]>;
|
|
136
|
+
/**
|
|
137
|
+
* Schema node for a JSON `object`.
|
|
138
|
+
* @deprecated Use `ISchemaValidator` instead.
|
|
139
|
+
* @public
|
|
140
|
+
*/
|
|
141
|
+
export type ILlmObjectSchema<P extends ILlmProperties> = ISchemaValidator<ObjectStatic<P>>;
|
|
142
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/packlets/json-schema-builder/types.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC;;;GAGG;AACH,MAAM,MAAM,cAAc,GACtB,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,SAAS,GACT,MAAM,GACN,UAAU,GACV,OAAO,GACP,QAAQ,CAAC;AAEb;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC,CAAE,SAAQ,SAAS,CAAC,CAAC,CAAC;IACvD;;OAEG;IACH,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B;;OAEG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,MAAM,IAAI,UAAU,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,MAAM,CAAC,CAAC,SAAS,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,gBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;AAE1G;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC,CAAC;AAEvE;;;GAGG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,cAAc,IAAI;KAClD,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,gBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK;CACnG,CAAC,MAAM,CAAC,CAAC,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvF;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,gBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC;AAE5G;;;GAGG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG,EAAE,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,cAAc,IAAI,QAAQ,CAC3D;KAAG,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,GAAG;KAAG,CAAC,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CACrG,CAAC;AAQF;;;GAGG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAEhD;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAExD;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AAE1D;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAEnE;;;;GAIG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,gBAAgB,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;AAExG;;;;GAIG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,gBAAgB,CAAC,OAAO,CAAC,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AAEjG;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,cAAc,IAAI,gBAAgB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2026 Erik Fortune
|
|
4
|
+
*
|
|
5
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
* in the Software without restriction, including without limitation the rights
|
|
8
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
* furnished to do so, subject to the following conditions:
|
|
11
|
+
*
|
|
12
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
* copies or substantial portions of the Software.
|
|
14
|
+
*
|
|
15
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
* SOFTWARE.
|
|
22
|
+
*/
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/packlets/json-schema-builder/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG","sourcesContent":["/*\n * Copyright (c) 2026 Erik Fortune\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { Validator } from '@fgv/ts-utils';\nimport { JsonObject } from '../json';\n\n/**\n * Discriminant tag carried by every schema node.\n * @public\n */\nexport type SchemaNodeType =\n | 'string'\n | 'number'\n | 'integer'\n | 'boolean'\n | 'enum'\n | 'optional'\n | 'array'\n | 'object';\n\n/**\n * A typed JSON Schema node for the LLM-tool subset. Every value returned by the\n * schema factories implements this interface — it IS a `Validator<T>` and also\n * carries a `toJson()` method for wire-format emission.\n *\n * @remarks\n * The `__staticType` property is a phantom: it exists only in the type system to carry\n * the derived static type `T` and is never assigned at runtime (declared optional so\n * factory return values need not populate it). `Static<S>` reads this slot to recover\n * `T` from a schema value without requiring a user-supplied type assertion. A plain\n * optional property is used rather than a module-private `unique symbol` because this is\n * a published package surface — a private-symbol-keyed property cannot be named in the\n * emitted `.d.ts` (TypeBox issue #679), which would break declaration emission and API\n * Extractor for downstream consumers.\n *\n * Consumers call `schema.validate(input)` directly; no separate adapter step is required.\n * @public\n */\nexport interface ISchemaValidator<T> extends Validator<T> {\n /**\n * Phantom type carrier — type-level only, never present at runtime.\n */\n readonly __staticType?: T;\n /**\n * Runtime discriminant. Identifies the schema node kind.\n */\n readonly _type: SchemaNodeType;\n /**\n * Optional human-readable description emitted into the wire JSON Schema.\n */\n readonly description?: string;\n /**\n * Emits the standard JSON Schema (draft-07 LLM-tool subset) wire form for this schema.\n * @returns The JSON Schema object describing this schema node.\n */\n toJson(): JsonObject;\n}\n\n/**\n * Recover the derived static type `T` from a schema value.\n *\n * @remarks\n * `Static<typeof MySchema>` resolves to the TypeScript type that `schema.validate()` produces\n * and that `schema.toJson()` describes — derived, never asserted. No user-supplied `T` is ever\n * required.\n * @public\n */\nexport type Static<S extends ISchemaValidator<unknown>> = S extends ISchemaValidator<infer T> ? T : never;\n\n/**\n * A record of property schemas, as accepted by the `object` factory.\n * @public\n */\nexport type ILlmProperties = Record<string, ISchemaValidator<unknown>>;\n\n/**\n * The keys of `P` whose schemas are optional (wrapped with the `optional` modifier).\n * @public\n */\nexport type OptionalKeys<P extends ILlmProperties> = {\n [K in keyof P]: P[K] extends ISchemaValidator<infer U> ? (undefined extends U ? K : never) : never;\n}[keyof P];\n\n/**\n * The keys of `P` whose schemas are required (i.e. not optional).\n * @public\n */\nexport type RequiredKeys<P extends ILlmProperties> = Exclude<keyof P, OptionalKeys<P>>;\n\n/**\n * The static value type carried by an optional property (the inner schema's static type,\n * without the `| undefined` that optionality adds — the `?` modifier conveys that separately).\n * @public\n */\nexport type OptionalPropertyStatic<V> = V extends ISchemaValidator<infer U> ? Exclude<U, undefined> : never;\n\n/**\n * Flattens an intersection of object types into a single object type for readable derived types.\n * @public\n */\nexport type Simplify<T> = { [K in keyof T]: T[K] } & {};\n\n/**\n * The derived static type for an object built from properties `P`: required keys carry their\n * static type directly, optional keys carry theirs under a `?` modifier.\n * @public\n */\nexport type ObjectStatic<P extends ILlmProperties> = Simplify<\n { [K in RequiredKeys<P>]: Static<P[K]> } & { [K in OptionalKeys<P>]?: OptionalPropertyStatic<P[K]> }\n>;\n\n// ---------------------------------------------------------------------------\n// Legacy type aliases kept for backwards compatibility with the first-pass API.\n// These names were in the original public surface; the canonical interface is\n// now ISchemaValidator<T>. New code should use ISchemaValidator<T> directly.\n// ---------------------------------------------------------------------------\n\n/**\n * @deprecated Use `ISchemaValidator` instead.\n * @public\n */\nexport type ILlmSchema<T> = ISchemaValidator<T>;\n\n/**\n * Schema node for a JSON `string`.\n * @deprecated Use `ISchemaValidator` instead.\n * @public\n */\nexport type ILlmStringSchema = ISchemaValidator<string>;\n\n/**\n * Schema node for a JSON `number` or `integer`.\n * @deprecated Use `ISchemaValidator` instead.\n * @public\n */\nexport type ILlmNumberSchema = ISchemaValidator<number>;\n\n/**\n * Schema node for a JSON `boolean`.\n * @deprecated Use `ISchemaValidator` instead.\n * @public\n */\nexport type ILlmBooleanSchema = ISchemaValidator<boolean>;\n\n/**\n * Schema node for a closed set of string literals (`enum`).\n * @deprecated Use `ISchemaValidator` instead.\n * @public\n */\nexport type ILlmEnumSchema<T extends string> = ISchemaValidator<T>;\n\n/**\n * Wrapper marking a property as optional within an object schema.\n * @deprecated Use `ISchemaValidator` instead.\n * @public\n */\nexport type ILlmOptional<S extends ISchemaValidator<unknown>> = ISchemaValidator<Static<S> | undefined>;\n\n/**\n * Schema node for a JSON `array`.\n * @deprecated Use `ISchemaValidator` instead.\n * @public\n */\nexport type ILlmArraySchema<S extends ISchemaValidator<unknown>> = ISchemaValidator<Static<S>[]>;\n\n/**\n * Schema node for a JSON `object`.\n * @deprecated Use `ISchemaValidator` instead.\n * @public\n */\nexport type ILlmObjectSchema<P extends ILlmProperties> = ISchemaValidator<ObjectStatic<P>>;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fgv/ts-json-base",
|
|
3
|
-
"version": "5.1.0-
|
|
3
|
+
"version": "5.1.0-35",
|
|
4
4
|
"description": "Typescript types and basic functions for working with json",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "dist/ts-json-base.d.ts",
|
|
@@ -55,13 +55,13 @@
|
|
|
55
55
|
"@rushstack/heft-node-rig": "2.11.27",
|
|
56
56
|
"@microsoft/api-extractor": "^7.55.2",
|
|
57
57
|
"typedoc": "~0.28.16",
|
|
58
|
-
"@fgv/ts-utils": "5.1.0-
|
|
59
|
-
"@fgv/
|
|
60
|
-
"@fgv/
|
|
61
|
-
"@fgv/
|
|
58
|
+
"@fgv/ts-utils": "5.1.0-35",
|
|
59
|
+
"@fgv/heft-dual-rig": "5.1.0-35",
|
|
60
|
+
"@fgv/typedoc-compact-theme": "5.1.0-35",
|
|
61
|
+
"@fgv/ts-utils-jest": "5.1.0-35"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@fgv/ts-utils": "5.1.0-
|
|
64
|
+
"@fgv/ts-utils": "5.1.0-35"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
67
|
"luxon": "^3.7.2"
|