baml-sap-ts 0.1.0
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/CHANGELOG.md +36 -0
- package/LICENSE +21 -0
- package/README.md +355 -0
- package/dist/index.d.ts +180 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +274 -0
- package/dist/index.js.map +1 -0
- package/dist/json-extractor.d.ts +57 -0
- package/dist/json-extractor.d.ts.map +1 -0
- package/dist/json-extractor.js +382 -0
- package/dist/json-extractor.js.map +1 -0
- package/dist/schema-renderer.d.ts +34 -0
- package/dist/schema-renderer.d.ts.map +1 -0
- package/dist/schema-renderer.js +329 -0
- package/dist/schema-renderer.js.map +1 -0
- package/dist/type-coercer.d.ts +59 -0
- package/dist/type-coercer.d.ts.map +1 -0
- package/dist/type-coercer.js +589 -0
- package/dist/type-coercer.js.map +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Schema Renderer - Converts TypeBox schemas to LLM prompt instructions
|
|
4
|
+
*
|
|
5
|
+
* This is the TypeScript equivalent of BAML's render_output_format.rs
|
|
6
|
+
* It generates schema instructions that guide the LLM to output correctly
|
|
7
|
+
* structured data.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.renderSchema = renderSchema;
|
|
11
|
+
exports.createPromptWithSchema = createPromptWithSchema;
|
|
12
|
+
exports.createJsonSchemaPrompt = createJsonSchemaPrompt;
|
|
13
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
14
|
+
const defaultOptions = {
|
|
15
|
+
includeDescriptions: true,
|
|
16
|
+
indent: 2,
|
|
17
|
+
maxDepth: 50,
|
|
18
|
+
allowPartials: false,
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Render a TypeBox schema as prompt instructions
|
|
22
|
+
*/
|
|
23
|
+
function renderSchema(schema, options = {}) {
|
|
24
|
+
const opts = { ...defaultOptions, ...options };
|
|
25
|
+
const visited = new WeakSet();
|
|
26
|
+
try {
|
|
27
|
+
const rendered = renderSchemaInternal(schema, opts, 0, visited);
|
|
28
|
+
return formatOutput(rendered, schema, opts);
|
|
29
|
+
}
|
|
30
|
+
finally {
|
|
31
|
+
// Cleanup visited set
|
|
32
|
+
visited.delete(schema);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Main schema rendering function
|
|
37
|
+
*/
|
|
38
|
+
function renderSchemaInternal(schema, options, depth, visited) {
|
|
39
|
+
// Circular reference / max depth check
|
|
40
|
+
if (depth > options.maxDepth || visited.has(schema)) {
|
|
41
|
+
return "<recursive>";
|
|
42
|
+
}
|
|
43
|
+
// Mark as visited for this render pass
|
|
44
|
+
visited.add(schema);
|
|
45
|
+
try {
|
|
46
|
+
// Handle schema references
|
|
47
|
+
if (schema.$ref) {
|
|
48
|
+
return `<reference to: ${schema.$ref}>`;
|
|
49
|
+
}
|
|
50
|
+
// Handle different schema kinds
|
|
51
|
+
switch (schema[typebox_1.Kind]) {
|
|
52
|
+
case "Object":
|
|
53
|
+
return renderObject(schema, options, depth, visited);
|
|
54
|
+
case "Array":
|
|
55
|
+
return renderArray(schema, options, depth, visited);
|
|
56
|
+
case "Union":
|
|
57
|
+
return renderUnion(schema, options, depth, visited);
|
|
58
|
+
case "Intersect":
|
|
59
|
+
return renderIntersect(schema, options, depth, visited);
|
|
60
|
+
case "Optional":
|
|
61
|
+
return renderOptional(schema, options, depth, visited);
|
|
62
|
+
case "Literal":
|
|
63
|
+
return renderLiteral(schema);
|
|
64
|
+
case "Enum":
|
|
65
|
+
return renderEnum(schema);
|
|
66
|
+
case "String":
|
|
67
|
+
return renderString(schema);
|
|
68
|
+
case "Number":
|
|
69
|
+
case "Integer":
|
|
70
|
+
return renderNumber(schema);
|
|
71
|
+
case "Boolean":
|
|
72
|
+
return renderBoolean(schema);
|
|
73
|
+
case "Null":
|
|
74
|
+
return "null";
|
|
75
|
+
case "Any":
|
|
76
|
+
case "Unknown":
|
|
77
|
+
return "any";
|
|
78
|
+
case "Record":
|
|
79
|
+
return renderRecord(schema, options, depth, visited);
|
|
80
|
+
case "Tuple":
|
|
81
|
+
return renderTuple(schema, options, depth, visited);
|
|
82
|
+
case "Ref":
|
|
83
|
+
return renderRef(schema);
|
|
84
|
+
default:
|
|
85
|
+
// Handle primitive types that might not have Kind set
|
|
86
|
+
if (schema.type) {
|
|
87
|
+
return renderJsonSchemaType(schema, options, depth, visited);
|
|
88
|
+
}
|
|
89
|
+
return "<unknown type>";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
finally {
|
|
93
|
+
visited.delete(schema);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
function renderObject(schema, options, depth, visited) {
|
|
97
|
+
const properties = schema.properties;
|
|
98
|
+
if (!properties || Object.keys(properties).length === 0) {
|
|
99
|
+
return "{}";
|
|
100
|
+
}
|
|
101
|
+
const indent = " ".repeat(options.indent * (depth + 1));
|
|
102
|
+
const closeIndent = " ".repeat(options.indent * depth);
|
|
103
|
+
const fields = Object.entries(properties).map(([key, propSchema]) => {
|
|
104
|
+
const isOptional = isOptionalProperty(propSchema);
|
|
105
|
+
const typeStr = renderSchemaInternal(propSchema, options, depth + 1, visited);
|
|
106
|
+
const description = options.includeDescriptions && propSchema.description
|
|
107
|
+
? ` // ${propSchema.description}`
|
|
108
|
+
: "";
|
|
109
|
+
return `${indent}"${key}": ${typeStr}${isOptional ? " (optional)" : ""}${description}`;
|
|
110
|
+
});
|
|
111
|
+
return `{\n${fields.join(",\n")}${closeIndent}\n${closeIndent}}`;
|
|
112
|
+
}
|
|
113
|
+
function renderArray(schema, options, depth, visited) {
|
|
114
|
+
const items = schema.items;
|
|
115
|
+
if (!items) {
|
|
116
|
+
return "any[]";
|
|
117
|
+
}
|
|
118
|
+
const itemStr = renderSchemaInternal(items, options, depth, visited);
|
|
119
|
+
return `${itemStr}[]`;
|
|
120
|
+
}
|
|
121
|
+
function renderUnion(schema, options, depth, visited) {
|
|
122
|
+
const anyOf = schema.anyOf;
|
|
123
|
+
if (!anyOf || anyOf.length === 0) {
|
|
124
|
+
return "any";
|
|
125
|
+
}
|
|
126
|
+
const variants = anyOf.map((s) => renderSchemaInternal(s, options, depth, visited));
|
|
127
|
+
if (variants.length === 1) {
|
|
128
|
+
return variants[0];
|
|
129
|
+
}
|
|
130
|
+
// For simple unions, use oneOf format
|
|
131
|
+
if (variants.every((v) => !v.includes("\n"))) {
|
|
132
|
+
return variants.join(" | ");
|
|
133
|
+
}
|
|
134
|
+
// For complex unions, use structured format
|
|
135
|
+
const indent = " ".repeat(options.indent * (depth + 1));
|
|
136
|
+
return `one of:\n${variants.map((v, i) => `${indent}${i + 1}. ${v}`).join("\n")}`;
|
|
137
|
+
}
|
|
138
|
+
function renderIntersect(schema, options, depth, visited) {
|
|
139
|
+
const allOf = schema.allOf;
|
|
140
|
+
if (!allOf || allOf.length === 0) {
|
|
141
|
+
return "{}";
|
|
142
|
+
}
|
|
143
|
+
// Merge all object schemas
|
|
144
|
+
const merged = {};
|
|
145
|
+
for (const subSchema of allOf) {
|
|
146
|
+
if (subSchema[typebox_1.Kind] === "Object") {
|
|
147
|
+
const props = subSchema.properties;
|
|
148
|
+
Object.assign(merged, props);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
// Create a merged object schema
|
|
152
|
+
const mergedSchema = {
|
|
153
|
+
[typebox_1.Kind]: "Object",
|
|
154
|
+
type: "object",
|
|
155
|
+
properties: merged,
|
|
156
|
+
};
|
|
157
|
+
return renderObject(mergedSchema, options, depth, visited);
|
|
158
|
+
}
|
|
159
|
+
function renderOptional(schema, options, depth, visited) {
|
|
160
|
+
const inner = schema.item;
|
|
161
|
+
if (!inner) {
|
|
162
|
+
return "any?";
|
|
163
|
+
}
|
|
164
|
+
return renderSchemaInternal(inner, options, depth, visited);
|
|
165
|
+
}
|
|
166
|
+
function renderLiteral(schema) {
|
|
167
|
+
const value = schema.const;
|
|
168
|
+
if (typeof value === "string") {
|
|
169
|
+
return `"${value}"`;
|
|
170
|
+
}
|
|
171
|
+
return String(value);
|
|
172
|
+
}
|
|
173
|
+
function renderEnum(schema) {
|
|
174
|
+
const values = schema.enum;
|
|
175
|
+
if (!values || values.length === 0) {
|
|
176
|
+
return "<empty enum>";
|
|
177
|
+
}
|
|
178
|
+
return values.map((v) => (typeof v === "string" ? `"${v}"` : String(v))).join(" | ");
|
|
179
|
+
}
|
|
180
|
+
function renderString(schema) {
|
|
181
|
+
const constraints = [];
|
|
182
|
+
if (schema.minLength !== undefined) {
|
|
183
|
+
constraints.push(`min ${schema.minLength} chars`);
|
|
184
|
+
}
|
|
185
|
+
if (schema.maxLength !== undefined) {
|
|
186
|
+
constraints.push(`max ${schema.maxLength} chars`);
|
|
187
|
+
}
|
|
188
|
+
if (schema.pattern) {
|
|
189
|
+
constraints.push(`matches /${schema.pattern}/`);
|
|
190
|
+
}
|
|
191
|
+
if (schema.format) {
|
|
192
|
+
constraints.push(`format: ${schema.format}`);
|
|
193
|
+
}
|
|
194
|
+
if (constraints.length > 0) {
|
|
195
|
+
return `string (${constraints.join(", ")})`;
|
|
196
|
+
}
|
|
197
|
+
return "string";
|
|
198
|
+
}
|
|
199
|
+
function renderNumber(schema) {
|
|
200
|
+
const isInt = schema[typebox_1.Kind] === "Integer" || schema.type === "integer";
|
|
201
|
+
const typeName = isInt ? "integer" : "number";
|
|
202
|
+
const constraints = [];
|
|
203
|
+
if (schema.minimum !== undefined) {
|
|
204
|
+
constraints.push(`>= ${schema.minimum}`);
|
|
205
|
+
}
|
|
206
|
+
if (schema.maximum !== undefined) {
|
|
207
|
+
constraints.push(`<= ${schema.maximum}`);
|
|
208
|
+
}
|
|
209
|
+
if (schema.exclusiveMinimum !== undefined) {
|
|
210
|
+
constraints.push(`> ${schema.exclusiveMinimum}`);
|
|
211
|
+
}
|
|
212
|
+
if (schema.exclusiveMaximum !== undefined) {
|
|
213
|
+
constraints.push(`< ${schema.exclusiveMaximum}`);
|
|
214
|
+
}
|
|
215
|
+
if (schema.multipleOf !== undefined) {
|
|
216
|
+
constraints.push(`multiple of ${schema.multipleOf}`);
|
|
217
|
+
}
|
|
218
|
+
if (constraints.length > 0) {
|
|
219
|
+
return `${typeName} (${constraints.join(", ")})`;
|
|
220
|
+
}
|
|
221
|
+
return typeName;
|
|
222
|
+
}
|
|
223
|
+
function renderBoolean(_schema) {
|
|
224
|
+
return "boolean";
|
|
225
|
+
}
|
|
226
|
+
function renderRecord(schema, options, depth, visited) {
|
|
227
|
+
const pattern = schema.patternProperties;
|
|
228
|
+
const additional = schema.additionalProperties;
|
|
229
|
+
let valueType;
|
|
230
|
+
if (pattern && Object.keys(pattern).length > 0) {
|
|
231
|
+
const keyPattern = Object.keys(pattern)[0];
|
|
232
|
+
valueType = renderSchemaInternal(pattern[keyPattern], options, depth, visited);
|
|
233
|
+
}
|
|
234
|
+
else if (additional) {
|
|
235
|
+
valueType = renderSchemaInternal(additional, options, depth, visited);
|
|
236
|
+
}
|
|
237
|
+
else {
|
|
238
|
+
valueType = "any";
|
|
239
|
+
}
|
|
240
|
+
return `Record<string, ${valueType}>`;
|
|
241
|
+
}
|
|
242
|
+
function renderTuple(schema, options, depth, visited) {
|
|
243
|
+
const items = schema.items;
|
|
244
|
+
if (!items || items.length === 0) {
|
|
245
|
+
return "[]";
|
|
246
|
+
}
|
|
247
|
+
const rendered = items.map((item) => renderSchemaInternal(item, options, depth, visited));
|
|
248
|
+
return `[${rendered.join(", ")}]`;
|
|
249
|
+
}
|
|
250
|
+
function renderRef(schema) {
|
|
251
|
+
const ref = schema.$ref;
|
|
252
|
+
return ref ? `<${ref}>` : "<reference>";
|
|
253
|
+
}
|
|
254
|
+
function renderJsonSchemaType(schema, options, depth, visited) {
|
|
255
|
+
const type = schema.type;
|
|
256
|
+
switch (type) {
|
|
257
|
+
case "string":
|
|
258
|
+
return renderString(schema);
|
|
259
|
+
case "number":
|
|
260
|
+
return renderNumber(schema);
|
|
261
|
+
case "integer":
|
|
262
|
+
return renderNumber(schema);
|
|
263
|
+
case "boolean":
|
|
264
|
+
return "boolean";
|
|
265
|
+
case "null":
|
|
266
|
+
return "null";
|
|
267
|
+
case "array":
|
|
268
|
+
if (schema.items) {
|
|
269
|
+
const itemStr = renderSchemaInternal(schema.items, options, depth, visited);
|
|
270
|
+
return `${itemStr}[]`;
|
|
271
|
+
}
|
|
272
|
+
return "any[]";
|
|
273
|
+
case "object":
|
|
274
|
+
if (schema.properties) {
|
|
275
|
+
return renderObject(schema, options, depth, visited);
|
|
276
|
+
}
|
|
277
|
+
return "{}";
|
|
278
|
+
default:
|
|
279
|
+
return String(type) || "any";
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
function isOptionalProperty(schema) {
|
|
283
|
+
// Check if it's an optional type
|
|
284
|
+
if (schema[typebox_1.Kind] === "Optional") {
|
|
285
|
+
return true;
|
|
286
|
+
}
|
|
287
|
+
// Check for nullable
|
|
288
|
+
if (schema.anyOf) {
|
|
289
|
+
const variants = schema.anyOf;
|
|
290
|
+
return variants.some((v) => v[typebox_1.Kind] === "Null" || v.type === "null");
|
|
291
|
+
}
|
|
292
|
+
return false;
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Format the final output with schema instructions
|
|
296
|
+
*/
|
|
297
|
+
function formatOutput(rendered, _schema, options) {
|
|
298
|
+
const lines = [];
|
|
299
|
+
lines.push("Respond with a JSON object in the following format:");
|
|
300
|
+
lines.push("");
|
|
301
|
+
lines.push("```json");
|
|
302
|
+
lines.push(rendered);
|
|
303
|
+
lines.push("```");
|
|
304
|
+
if (options.allowPartials) {
|
|
305
|
+
lines.push("");
|
|
306
|
+
lines.push("Note: If streaming, partial JSON is acceptable.");
|
|
307
|
+
}
|
|
308
|
+
return lines.join("\n");
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Create a prompt with schema instructions appended
|
|
312
|
+
*/
|
|
313
|
+
function createPromptWithSchema(basePrompt, schema, options) {
|
|
314
|
+
const schemaInstructions = renderSchema(schema, options);
|
|
315
|
+
return `${basePrompt.trim()}\n\n${schemaInstructions}`;
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Create a compact JSON schema representation for the prompt
|
|
319
|
+
* This is an alternative to the human-readable format above
|
|
320
|
+
*/
|
|
321
|
+
function createJsonSchemaPrompt(basePrompt, schema, _options = {}) {
|
|
322
|
+
const jsonSchema = JSON.stringify(schema, null, 2);
|
|
323
|
+
let prompt = `${basePrompt.trim()}\n\nRespond with a JSON object matching this schema:\n\n`;
|
|
324
|
+
prompt += "```json\n";
|
|
325
|
+
prompt += jsonSchema;
|
|
326
|
+
prompt += "\n```";
|
|
327
|
+
return prompt;
|
|
328
|
+
}
|
|
329
|
+
//# sourceMappingURL=schema-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-renderer.js","sourceRoot":"","sources":["../src/schema-renderer.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AA0CH,oCAWC;AAuWD,wDAIC;AAMD,wDAaC;AAjbD,+CAiB2B;AAa3B,MAAM,cAAc,GAAwB;IAC3C,mBAAmB,EAAE,IAAI;IACzB,MAAM,EAAE,CAAC;IACT,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,KAAK;CACpB,CAAC;AAEF;;GAEG;AACH,SAAgB,YAAY,CAAC,MAAe,EAAE,UAA+B,EAAE;IAC9E,MAAM,IAAI,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,OAAO,EAAE,CAAC;IAC/C,MAAM,OAAO,GAAG,IAAI,OAAO,EAAW,CAAC;IAEvC,IAAI,CAAC;QACJ,MAAM,QAAQ,GAAG,oBAAoB,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,CAAC;QAChE,OAAO,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7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AE,CAAC;IAE3B,KAAK,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;IAClE,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtB,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrB,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAElB,IAAI,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACf,KAAK,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,SAAgB,sBAAsB,CAAC,UAAkB,EAAE,MAAe,EAAE,OAA6B;IACxG,MAAM,kBAAkB,GAAG,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEzD,OAAO,GAAG,UAAU,CAAC,IAAI,EAAE,OAAO,kBAAkB,EAAE,CAAC;AACxD,CAAC;AAED;;;GAGG;AACH,SAAgB,sBAAsB,CACrC,UAAkB,EAClB,MAAe,EACf,WAA0C,EAAE;IAE5C,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAEnD,IAAI,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,EAAE,0DAA0D,CAAC;IAC5F,MAAM,IAAI,WAAW,CAAC;IACtB,MAAM,IAAI,UAAU,CAAC;IACrB,MAAM,IAAI,OAAO,CAAC;IAElB,OAAO,MAAM,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type Coercer - Validates and coerces parsed data to TypeBox schemas
|
|
3
|
+
*
|
|
4
|
+
* This module takes extracted JSON and validates/coerces it against
|
|
5
|
+
* TypeBox schemas, handling:
|
|
6
|
+
* - Union type matching
|
|
7
|
+
* - Optional fields
|
|
8
|
+
* - Default values
|
|
9
|
+
* - Type conversions
|
|
10
|
+
* - Array/object coercion
|
|
11
|
+
*
|
|
12
|
+
* Based on BAML's deserializer/coercer
|
|
13
|
+
*/
|
|
14
|
+
import { type Static, type TSchema } from "@sinclair/typebox";
|
|
15
|
+
export interface CoercionOptions {
|
|
16
|
+
/** Allow partial objects (for streaming) */
|
|
17
|
+
allowPartials?: boolean;
|
|
18
|
+
/** Use default values for missing fields */
|
|
19
|
+
useDefaults?: boolean;
|
|
20
|
+
/** Strict mode - no type coercion */
|
|
21
|
+
strict?: boolean;
|
|
22
|
+
/** Maximum depth for coercion */
|
|
23
|
+
maxDepth?: number;
|
|
24
|
+
/** Track applied coercions */
|
|
25
|
+
trackCoercions?: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Result of type coercion
|
|
29
|
+
*/
|
|
30
|
+
export interface CoercionResult<T = unknown> {
|
|
31
|
+
/** The coerced value */
|
|
32
|
+
value: T;
|
|
33
|
+
/** Whether the coercion was successful */
|
|
34
|
+
success: boolean;
|
|
35
|
+
/** Errors encountered during coercion */
|
|
36
|
+
errors: CoercionError[];
|
|
37
|
+
/** Coercions that were applied */
|
|
38
|
+
coercions?: string[];
|
|
39
|
+
/** Whether this is a partial result */
|
|
40
|
+
isPartial?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface CoercionError {
|
|
43
|
+
path: string;
|
|
44
|
+
message: string;
|
|
45
|
+
expected?: string;
|
|
46
|
+
received?: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Coerce a value to match a TypeBox schema
|
|
50
|
+
*/
|
|
51
|
+
export declare function coerceValue<T extends TSchema>(value: unknown, schema: T, options?: CoercionOptions, path?: string): CoercionResult<Static<T>>;
|
|
52
|
+
/**
|
|
53
|
+
* Validate a value against a schema without coercion
|
|
54
|
+
*/
|
|
55
|
+
export declare function validateValue<T extends TSchema>(value: unknown, schema: T): {
|
|
56
|
+
valid: boolean;
|
|
57
|
+
errors: CoercionError[];
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=type-coercer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-coercer.d.ts","sourceRoot":"","sources":["../src/type-coercer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAEN,KAAK,MAAM,EAUX,KAAK,OAAO,EAKZ,MAAM,mBAAmB,CAAC;AAG3B,MAAM,WAAW,eAAe;IAC/B,4CAA4C;IAC5C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qCAAqC;IACrC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;CACzB;AAUD;;GAEG;AACH,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,OAAO;IAC1C,wBAAwB;IACxB,KAAK,EAAE,CAAC,CAAC;IACT,0CAA0C;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,yCAAyC;IACzC,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,uCAAuC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,OAAO,EAC5C,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,CAAC,EACT,OAAO,GAAE,eAAoB,EAC7B,IAA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