arktype 3.0.0-beta.2 → 3.0.0-rc.1
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/README.md +55 -20
- package/out/_internal/regex/quantify.d.ts +17 -1
- package/out/_internal/schema/refinements/range.d.ts +2 -1
- package/out/_internal/schema/roots/domain.d.ts +1 -0
- package/out/_internal/schema/roots/root.d.ts +3 -1
- package/out/_internal/schema/roots/union.d.ts +8 -3
- package/out/_internal/schema/shared/compile.d.ts +2 -0
- package/out/_internal/schema/shared/declare.d.ts +9 -6
- package/out/_internal/schema/shared/errors.d.ts +3 -0
- package/out/_internal/schema/shared/issues.d.ts +5 -1
- package/out/_internal/schema/shared/issuesLean.d.ts +4 -0
- package/out/_internal/schema/shared/issuesNone.d.ts +1 -0
- package/out/_internal/schema/shared/issuesNoneLean.d.ts +1 -0
- package/out/_internal/schema/shared/standardFailure.d.ts +1 -0
- package/out/_internal/schema/shared/toJsonSchema.d.ts +16 -3
- package/out/_internal/schema/shared/transform.d.ts +1 -0
- package/out/_internal/sets/constraint.d.ts +2 -0
- package/out/_internal/sets/fromJsonSchema.d.ts +3 -1
- package/out/_internal/util/registry.d.ts +1 -1
- package/out/attributes.d.ts +12 -8
- package/out/chunk-2FVJ5JBN.js +161 -0
- package/out/{chunk-QBX4MEQR.js → chunk-3HZC67MT.js} +15 -15
- package/out/{chunk-5TN5JRP7.js → chunk-3KBOPH3J.js} +63 -41
- package/out/{chunk-GPNWBJL3.js → chunk-3WYMLH45.js} +17 -11
- package/out/{chunk-NIZDOWFU.js → chunk-46PLKNON.js} +2 -2
- package/out/{chunk-7JXN4WJX.js → chunk-4FTHWK63.js} +1 -1
- package/out/{chunk-EA2DNEDI.js → chunk-4HREHNIV.js} +12 -12
- package/out/{chunk-ZFB6DQWY.js → chunk-4J7H2ELX.js} +6 -11
- package/out/{chunk-7SVIUP6X.js → chunk-4MUH2MO4.js} +2 -2
- package/out/{chunk-J7CKAEDX.js → chunk-4NZCLVBD.js} +1 -1
- package/out/{chunk-RAM6G3F6.js → chunk-54U3D6OV.js} +26 -25
- package/out/{chunk-HA3POWOU.js → chunk-5FNHK7CC.js} +6 -5
- package/out/{chunk-KVQCLBJR.js → chunk-7SUZFAHZ.js} +241 -66
- package/out/{chunk-YMYPW3L5.js → chunk-AMNHRY72.js} +3 -3
- package/out/{chunk-UH6XKS3C.js → chunk-BQR65UPE.js} +30 -9
- package/out/{chunk-V4TZHFNK.js → chunk-BWKJV74G.js} +1 -1
- package/out/{chunk-7N3JEHA4.js → chunk-CXHXN7DF.js} +1 -1
- package/out/{chunk-FY4M7GE7.js → chunk-E4OQHHFS.js} +4 -4
- package/out/{chunk-CGWRW4JZ.js → chunk-ERGIJZFA.js} +4 -4
- package/out/{chunk-OA5Q2JLI.js → chunk-H44UG6HG.js} +8 -4
- package/out/{chunk-A7A6FDBS.js → chunk-I65VSWGS.js} +50 -44
- package/out/{chunk-C5JGK6GT.js → chunk-J2BFVWVY.js} +20 -3
- package/out/{chunk-W77ROLOT.js → chunk-JIILWIU4.js} +1 -1
- package/out/{chunk-5WRZ25AB.js → chunk-LMUBBBHJ.js} +4 -4
- package/out/{chunk-CQU7WIIR.js → chunk-P3HEEGB5.js} +6 -6
- package/out/{chunk-JZ4KBCMM.js → chunk-RKJNLXEQ.js} +21 -13
- package/out/{chunk-XMEK4I7J.js → chunk-TM22D5DL.js} +887 -266
- package/out/{chunk-PIFOURNM.js → chunk-TQYLOZRT.js} +11 -4
- package/out/{chunk-YN3XRJ7H.js → chunk-UJJGG4VQ.js} +1 -1
- package/out/{chunk-NIYAI7AF.js → chunk-US6BWOGJ.js} +3 -3
- package/out/{chunk-57LF5Y5P.js → chunk-W2XOI5DY.js} +1 -1
- package/out/{chunk-KDMHK4KP.js → chunk-XVLEFUSY.js} +2 -2
- package/out/{chunk-SGFGLENC.js → chunk-YPN67JMD.js} +3 -3
- package/out/cli.d.ts +5 -1
- package/out/cli.js +301 -49
- package/out/codecs.d.ts +4 -3
- package/out/codecs.js +18 -18
- package/out/config.js +8 -8
- package/out/declare.d.ts +2 -4
- package/out/errors.js +8 -8
- package/out/fn.d.ts +2 -2
- package/out/fromJsonSchema.d.ts +1 -1
- package/out/generic.d.ts +7 -4
- package/out/i18n.js +5 -5
- package/out/index.js +19 -19
- package/out/internal.js +32 -32
- package/out/island.js +18 -18
- package/out/islandDependency.js +33 -33
- package/out/jsonSchema/infer.d.ts +16 -6
- package/out/jsonSchema/validate.d.ts +16 -4
- package/out/keywords/functions.d.ts +4 -169
- package/out/keywords/keywords.d.ts +1 -1
- package/out/keywords/phrases.d.ts +3 -168
- package/out/keywords/ts.js +14 -14
- package/out/locales/de.js +6 -6
- package/out/locales/en.js +15 -15
- package/out/match.d.ts +12 -9
- package/out/mutatesInput.js +14 -14
- package/out/nary.d.ts +219 -193
- package/out/parser/definition.d.ts +2 -2
- package/out/parser/shift/operator/default.d.ts +2 -2
- package/out/parser/tupleExpressions.d.ts +2 -0
- package/out/precompiled.js +11 -11
- package/out/runtime.d.ts +1 -1
- package/out/runtime.js +5 -5
- package/out/schema.js +11 -11
- package/out/schemaInternal.js +29 -17
- package/out/schemaRuntime.js +4 -4
- package/out/schemaRuntimeLean.js +60 -36
- package/out/schemaRuntimeNone.js +52 -31
- package/out/schemaRuntimeNoneLean.js +52 -31
- package/out/type.d.ts +3 -3
- package/out/util.js +14 -11
- package/out/variants/base.d.ts +9 -8
- package/out/variants/object.d.ts +14 -6
- package/package.json +4 -4
- package/skills/arktype/SKILL.md +17 -17
- package/skills/arktype/references/migrating.md +13 -13
- package/skills/arktype/references/precompile.md +4 -4
- package/out/chunk-CSVAPWDE.js +0 -83
package/out/config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { configure } from "./chunk-
|
|
2
|
-
import "./chunk-
|
|
3
|
-
import "./chunk-
|
|
1
|
+
export { configure } from "./chunk-BWKJV74G.js";
|
|
2
|
+
import "./chunk-P3HEEGB5.js";
|
|
3
|
+
import "./chunk-W2XOI5DY.js";
|
|
4
4
|
import "./chunk-TACLEIDM.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-TQYLOZRT.js";
|
|
6
|
+
import "./chunk-I65VSWGS.js";
|
|
7
|
+
import "./chunk-3KBOPH3J.js";
|
|
8
|
+
import "./chunk-J2BFVWVY.js";
|
|
9
9
|
import "./chunk-3SH2BQ4T.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-3HZC67MT.js";
|
|
11
11
|
import "./chunk-I2KLQ2HA.js";
|
package/out/declare.d.ts
CHANGED
|
@@ -9,11 +9,9 @@ import type { TupleExpression } from "./parser/tupleExpressions.ts";
|
|
|
9
9
|
import type { bindThis } from "./scope.ts";
|
|
10
10
|
import type { Type } from "./type.ts";
|
|
11
11
|
export type DeclarationParser<$> = <preinferred = unset, ctx extends DeclareContext = {}>() => {
|
|
12
|
-
type: <const def>(def: [preinferred] extends [unset] ?
|
|
13
|
-
preinferred
|
|
14
|
-
] extends [anyOrNever] ? validateDeclared<preinferred, def, $, ctx> : ErrorMessage<`declare<ExternalType>() requires a generic argument`> : validateDeclared<preinferred, def, $, ctx>) => Type<finalizePreinferred<preinferred, def, $, ctx>, $>;
|
|
12
|
+
type: <const def>(def: [preinferred] extends [anyOrNever] ? validateDeclared<preinferred, def, $, ctx> : [preinferred] extends [unset] ? ErrorMessage<`declare<ExternalType>() requires a generic argument`> : validateDeclared<preinferred, def, $, ctx>) => Type<finalizePreinferred<preinferred, def, $, ctx>, $>;
|
|
15
13
|
};
|
|
16
|
-
type finalizePreinferred<preinferred, def, $, ctx extends DeclareContext> = ctx["assignable"] extends true ?
|
|
14
|
+
type finalizePreinferred<preinferred, def, $, ctx extends DeclareContext> = ctx["assignable"] extends true ? inferDefinition<def, $> : ctx["side"] extends distill.Side ? ctx["side"] extends "in" ? (In: preinferred) => Out<type.infer.Out<def, $>> : (In: type.infer.In<def, $>) => Out<preinferred> : preinferred;
|
|
17
15
|
export type DeclareContext = {
|
|
18
16
|
side?: "in" | "out";
|
|
19
17
|
/**
|
package/out/errors.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./chunk-
|
|
2
|
-
export { UndetailedErrors } from "./chunk-
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-XVLEFUSY.js";
|
|
2
|
+
export { UndetailedErrors } from "./chunk-5FNHK7CC.js";
|
|
3
|
+
import "./chunk-ERGIJZFA.js";
|
|
4
|
+
import "./chunk-TQYLOZRT.js";
|
|
5
|
+
import "./chunk-I65VSWGS.js";
|
|
6
|
+
import "./chunk-3KBOPH3J.js";
|
|
7
|
+
import "./chunk-J2BFVWVY.js";
|
|
8
8
|
import "./chunk-3SH2BQ4T.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-3HZC67MT.js";
|
|
10
10
|
import "./chunk-I2KLQ2HA.js";
|
package/out/fn.d.ts
CHANGED
|
@@ -2,11 +2,11 @@ import type { BaseRoot, IntersectionNode } from "./_internal/schema/index.js";
|
|
|
2
2
|
import { Callable, type applyElementLabels, type conform, type Fn, type get, type show } from "./_internal/util/index.js";
|
|
3
3
|
import type { distill } from "./attributes.ts";
|
|
4
4
|
import type { type } from "./keywords/keywords.ts";
|
|
5
|
-
import type { validateInnerDefinition } from "./parser/definition.ts";
|
|
5
|
+
import type { inferDefinition, validateInnerDefinition } from "./parser/definition.ts";
|
|
6
6
|
import type { inferTupleLiteral, validateTupleLiteral } from "./parser/tupleLiteral.ts";
|
|
7
7
|
import type { InternalScope, Scope } from "./scope.ts";
|
|
8
8
|
import type { Type } from "./type.ts";
|
|
9
|
-
export type BaseFnParser<$ = {}> = <const args extends readonly unknown[], paramsT extends readonly unknown[] = inferTupleLiteral<args extends readonly [...infer params, ":", unknown] ? params : args, $, {}>, returnT = args extends readonly [...unknown[], ":", infer returnDef] ?
|
|
9
|
+
export type BaseFnParser<$ = {}> = <const args extends readonly unknown[], paramsT extends readonly unknown[] = inferTupleLiteral<args extends readonly [...infer params, ":", unknown] ? params : args, $, {}>, returnT = args extends readonly [...unknown[], ":", infer returnDef] ? inferDefinition<returnDef, $> : unknown>(...args: {
|
|
10
10
|
[i in keyof args]: conform<args[i], get<validateFnArgs<args, $>, i>>;
|
|
11
11
|
}) => <internalSignature extends (...args: distill.Out<paramsT>) => distill.In<returnT>, externalSignature extends Fn = (...args: applyElementLabels<distill.In<paramsT>, Required<Parameters<internalSignature>>>) => args extends readonly [...unknown[], ":", unknown] ? distill.Out<returnT> : ReturnType<internalSignature>>(implementation: internalSignature) => TypedFn<externalSignature, $, fnMetaOf<args, paramsT, returnT>>;
|
|
12
12
|
type fnMetaOf<args, paramsT extends readonly unknown[], returnT> = show<(args extends readonly [...unknown[], ":", unknown] ? {
|
package/out/fromJsonSchema.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export interface StandardSchemaLike {
|
|
|
7
7
|
readonly "~standard": unknown;
|
|
8
8
|
}
|
|
9
9
|
export type validateFromJsonSchema<schema> = schema extends StandardSchemaLike ? StandardJSONSchemaV1 : validateJsonSchema<schema>;
|
|
10
|
-
export type inferFromJsonSchema<schema> = schema extends StandardJSONSchemaV1 ? StandardJSONSchemaV1.InferInput<schema> : inferJsonSchema<schema>;
|
|
10
|
+
export type inferFromJsonSchema<schema> = 0 extends 1 & schema ? unknown : schema extends StandardJSONSchemaV1 ? StandardJSONSchemaV1.InferInput<schema> : inferJsonSchema<schema>;
|
|
11
11
|
export type FromJsonSchema = <const schema, r = Type<inferFromJsonSchema<schema>>>(schema: validateFromJsonSchema<schema>) => r extends infer _ ? _ : never;
|
|
12
12
|
/**
|
|
13
13
|
* The Type of a JSON Schema (an object or a boolean) or a Standard JSON Schema
|
package/out/generic.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import type { Type } from "./type.ts";
|
|
|
11
11
|
export type ParameterString<params extends string = string> = `<${params}>`;
|
|
12
12
|
export type extractParams<s extends ParameterString> = s extends ParameterString<infer params> ? params : never;
|
|
13
13
|
export type validateParameterString<s extends ParameterString, $> = parseGenericParams<extractParams<s>, $> extends infer e extends ErrorMessage ? e : s;
|
|
14
|
-
export type validateGenericArg<arg, param extends GenericParamAst, $> =
|
|
14
|
+
export type validateGenericArg<arg, param extends GenericParamAst, $> = inferDefinition<arg, $> extends param[1] ? unknown : ErrorType<[`Invalid argument for ${param[0]}`, expected: param[1]]>;
|
|
15
15
|
export type GenericInstantiator<params extends array<GenericParamAst>, def, $, args$> = params["length"] extends 1 ? {
|
|
16
16
|
<const a, r = instantiateGeneric<def, params, [a], $, args$>>(a: type.validate<a, args$> & validateGenericArg<a, params[0], args$>): r extends infer _ ? _ : never;
|
|
17
17
|
} : params["length"] extends 2 ? {
|
|
@@ -53,10 +53,10 @@ export type GenericInstantiator<params extends array<GenericParamAst>, def, $, a
|
|
|
53
53
|
type instantiateGeneric<def, params extends array<GenericParamAst>, args, $, args$> = Type<[
|
|
54
54
|
def
|
|
55
55
|
] extends [Hkt] ? Hkt.apply<def, {
|
|
56
|
-
[i in keyof args]:
|
|
56
|
+
[i in keyof args]: inferDefinition<args[i], args$>;
|
|
57
57
|
}> : inferDefinition<def, $, bindGenericArgs<params, args$, args>>, args$>;
|
|
58
58
|
type bindGenericArgs<params extends array<GenericParamAst>, $, args> = {
|
|
59
|
-
[i in keyof params & `${number}` as params[i][0]]:
|
|
59
|
+
[i in keyof params & `${number}` as params[i][0]]: inferDefinition<args[i & keyof args], $>;
|
|
60
60
|
};
|
|
61
61
|
type baseGenericResolutions<params extends array<GenericParamAst>, $> = baseGenericConstraints<params> extends infer baseConstraints ? {
|
|
62
62
|
[k in keyof baseConstraints]: Type<baseConstraints[k], $>;
|
|
@@ -102,7 +102,10 @@ type _parseOptionalConstraint<unscanned extends string, name extends string, res
|
|
|
102
102
|
...result,
|
|
103
103
|
[name, unknown]
|
|
104
104
|
], $>;
|
|
105
|
-
type genericParamDefToAst<schema extends GenericParamDef, $> = schema extends string ? [schema, unknown] : schema extends readonly [infer name, infer def] ? [
|
|
105
|
+
type genericParamDefToAst<schema extends GenericParamDef, $> = schema extends string ? [schema, unknown] : schema extends readonly [infer name, infer def] ? [
|
|
106
|
+
name,
|
|
107
|
+
inferDefinition<def, $>
|
|
108
|
+
] : never;
|
|
106
109
|
export type genericParamDefsToAst<defs extends array<GenericParamDef>, $> = [
|
|
107
110
|
...{
|
|
108
111
|
[i in keyof defs]: genericParamDefToAst<defs[i], $>;
|
package/out/i18n.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./chunk-22RQSVV3.js";
|
|
2
2
|
import "./chunk-XLG66ZDF.js";
|
|
3
|
-
import "./chunk-
|
|
4
|
-
export { describeCause, describeMissing, groupByPath, labelOf, writeKeywordExpected } from "./chunk-
|
|
5
|
-
export { printedActualOf } from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
import "./chunk-H44UG6HG.js";
|
|
4
|
+
export { describeCause, describeMissing, groupByPath, labelOf, writeKeywordExpected } from "./chunk-I65VSWGS.js";
|
|
5
|
+
export { printedActualOf } from "./chunk-3KBOPH3J.js";
|
|
6
|
+
import "./chunk-J2BFVWVY.js";
|
|
7
7
|
export { isolate, listPattern } from "./chunk-3SH2BQ4T.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-3HZC67MT.js";
|
|
9
9
|
import "./chunk-I2KLQ2HA.js";
|
package/out/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
export { Module, fromJsonSchema } from "./chunk-
|
|
1
|
+
export { Module, fromJsonSchema } from "./chunk-YPN67JMD.js";
|
|
2
2
|
export { regex } from "./chunk-F5BACUJS.js";
|
|
3
|
-
export { inferred } from "./chunk-
|
|
4
|
-
export { ark, declare, define, fn, generic, keywords, match, type } from "./chunk-
|
|
5
|
-
export { Generic, Type, scope } from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
3
|
+
export { inferred } from "./chunk-4NZCLVBD.js";
|
|
4
|
+
export { ark, declare, define, fn, generic, keywords, match, type } from "./chunk-3WYMLH45.js";
|
|
5
|
+
export { Generic, Type, scope } from "./chunk-TM22D5DL.js";
|
|
6
|
+
import "./chunk-4FTHWK63.js";
|
|
7
7
|
export { Hkt } from "./chunk-BDJVONP7.js";
|
|
8
|
-
export { configure } from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
8
|
+
export { configure } from "./chunk-BWKJV74G.js";
|
|
9
|
+
import "./chunk-4MUH2MO4.js";
|
|
10
|
+
import "./chunk-4HREHNIV.js";
|
|
11
|
+
import "./chunk-7SUZFAHZ.js";
|
|
12
12
|
import "./chunk-CWSF57VM.js";
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
export { annotatingFallback } from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-UJJGG4VQ.js";
|
|
14
|
+
import "./chunk-US6BWOGJ.js";
|
|
15
|
+
export { annotatingFallback } from "./chunk-P3HEEGB5.js";
|
|
16
|
+
import "./chunk-W2XOI5DY.js";
|
|
17
17
|
import "./chunk-TACLEIDM.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
export { ArkErrors, ThrownErrors as TraversalError, byAncestorPath, byPath, firstIssue, flatByPath, flatMessagesByPath, messageIn } from "./chunk-
|
|
21
|
-
export { Traversal } from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-ERGIJZFA.js";
|
|
19
|
+
import "./chunk-TQYLOZRT.js";
|
|
20
|
+
export { ArkErrors, ThrownErrors as TraversalError, byAncestorPath, byPath, firstIssue, flatByPath, flatMessagesByPath, messageIn } from "./chunk-I65VSWGS.js";
|
|
21
|
+
export { Traversal } from "./chunk-3KBOPH3J.js";
|
|
22
|
+
import "./chunk-J2BFVWVY.js";
|
|
23
23
|
import "./chunk-3SH2BQ4T.js";
|
|
24
|
-
export { ParseError } from "./chunk-
|
|
24
|
+
export { ParseError } from "./chunk-3HZC67MT.js";
|
|
25
25
|
import "./chunk-I2KLQ2HA.js";
|
package/out/internal.js
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
export { ConfiguredWriter, DataParts, StandaloneArtifact, addIssueFeatures, appendPath, appliedSignature, assertBakeableJsonSchema, assertDescribed, assertReportsIssues, bakedRootsOf, bakingOf, basesOf, bindingsOf, boundApplierOf, calledMembersOf, canPipe, cellPrefix, cellSetterOf, cellSpecifierOf, collectDefaults, combines, compiledForSize, contentKeyOf, contentNodesOf, creatorSourceOf, declares, defaultBakedLimit, defaultMembers, defaultedNodeKeys, discriminantContextOf, encodeKey, failureSites, failureSources, fallbackCodes, forwardedOf, frozen, fusedApplierOf, heldSpecifier, holdsDefaults, holdsLocal, holdsObjectMeta, holdsOnlyMeta, holeNameIn, holeNamePattern, internsByHolder, introspectionMembers, invalidErrorsOf, isChecker, isCheckerIn, isCreatedByRuntime, isDescribed, isHole, isInlineSite, isKeyword, isLiteralSite, isPlainLiteral, isReadByName, isSharedUnit, isTypedFn, isVariadicArray, isWriting, issueContextOf, issueSite, issueSiteOf, jsonVariantOf, keyOf, keywordMetas, kindNameOf, listedIssueOf, listsBranches, madeApplierOf, mergeUnits, missingDescriptionOf, namesReadBy, noInlineOf, noIssueFeatures, originalOf, partsOf, preciseFormOf, precompileStandalone, precompileStandaloneModules, printablePrimitive, printedHoleNamePattern, raisedWritersByCode, raisesNothing, raisingKeys, readWritten, receiverPrefix, refNameOf, registeredNameAt, returnedOf, rootUnitsOf, runtimeImport, runtimeKeyOf, runtimePathsByValue, shapedForSize, totalBaked, traceFallbacks, traversalKeyOf, uncountedJsonOf, unifies, unionKeySiteOf, unitOf, wholeReads, withoutStrings, writeBakedLimitMessage, writeCombinator, writeDependencies, writeFixConfig, writeFunction, writeId, writeImports, writeLazyRead, writeModule, writeReplay, writeScope, writeSections, writeSiteOf, writeUnprecompilableMessage, writeValue, writtenAttributesOf, writtenByUnits, writtenSelectedOf } from "./chunk-
|
|
1
|
+
export { ConfiguredWriter, DataParts, StandaloneArtifact, addIssueFeatures, appendPath, appliedSignature, assertBakeableJsonSchema, assertDescribed, assertReportsIssues, bakedRootsOf, bakingOf, basesOf, bindingsOf, boundApplierOf, calledMembersOf, canPipe, cellPrefix, cellSetterOf, cellSpecifierOf, collectDefaults, combines, compiledForSize, contentKeyOf, contentNodesOf, creatorSourceOf, declares, defaultBakedLimit, defaultMembers, defaultedNodeKeys, discriminantContextOf, encodeKey, failureSites, failureSources, fallbackCodes, forwardedOf, frozen, fusedApplierOf, heldSpecifier, holdsDefaults, holdsLocal, holdsObjectMeta, holdsOnlyMeta, holeNameIn, holeNamePattern, internsByHolder, introspectionMembers, invalidErrorsOf, isChecker, isCheckerIn, isCreatedByRuntime, isDescribed, isHole, isInlineSite, isKeyword, isLiteralSite, isPlainLiteral, isReadByName, isSharedUnit, isTypedFn, isVariadicArray, isWriting, issueContextOf, issueSite, issueSiteOf, jsonVariantOf, keyOf, keywordMetas, kindNameOf, listedIssueOf, listsBranches, madeApplierOf, mergeUnits, missingDescriptionOf, namesReadBy, noInlineOf, noIssueFeatures, originalOf, partsOf, preciseFormOf, precompileStandalone, precompileStandaloneModules, printablePrimitive, printedHoleNamePattern, raisedWritersByCode, raisesNothing, raisingKeys, readWritten, receiverPrefix, refNameOf, registeredNameAt, returnedOf, rootUnitsOf, runtimeImport, runtimeKeyOf, runtimePathsByValue, shapedForSize, totalBaked, traceFallbacks, traversalKeyOf, uncountedJsonOf, unifies, unionKeySiteOf, unitOf, wholeReads, withoutStrings, writeBakedLimitMessage, writeCombinator, writeDependencies, writeFixConfig, writeFunction, writeId, writeImports, writeLazyRead, writeModule, writeReplay, writeScope, writeSections, writeSiteOf, writeUnprecompilableMessage, writeValue, writtenAttributesOf, writtenByUnits, writtenSelectedOf } from "./chunk-54U3D6OV.js";
|
|
2
2
|
import "./chunk-LHNEY6QW.js";
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
export { BoundModule, Module, fromJsonSchema } from "./chunk-
|
|
3
|
+
import "./chunk-BQR65UPE.js";
|
|
4
|
+
import "./chunk-RKJNLXEQ.js";
|
|
5
|
+
import "./chunk-46PLKNON.js";
|
|
6
|
+
export { BoundModule, Module, fromJsonSchema } from "./chunk-YPN67JMD.js";
|
|
7
7
|
export { regex } from "./chunk-F5BACUJS.js";
|
|
8
|
-
export { inferred } from "./chunk-
|
|
9
|
-
export { codec } from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
export { NFC, NFD, NFKC, NFKD, TypedArray, ark, arkArray, arkBuiltins, arkFormData, arkPrototypes, builtinDefinitions, capitalize, creditCard, declare, define, epoch, fn, generic, integer, ip, json, keywords, match, normalize, normalizedForms, number, prototypeDefinitions, regexStringNode, schema, string, stringDate, stringInteger, stringNumeric, tryParseDatePattern, type, url, uuid } from "./chunk-
|
|
12
|
-
export { $arkTypeRegistry, Generic, InternalChainedMatchParser, InternalMatchParser, InternalScope, InternalTypeParser, RecordHkt, RuntimeState, Scope, Type, arkTsGenerics, arkTsKeywords, arrayIsNotGenericHint, chainedAtMessage, checkWrittenIntersection, comparatorStartChars, comparators, defaultablePostOptionalMessage, deferDefinition, deferUnion, deferUnits, deferredRecord, doubleAtMessage, emptyGenericParameterMessage, enclosingChar, enclosingLiteralTokens, enclosingQuote, enclosingRegexTokens, enclosingTokens, extractDateLiteralSource, finalizingLookaheads, foreignAliases, fullStringParse, getBoundKinds, incompleteArrayTokenMessage, invalidDefaultableKeyKindMessage, invalidOptionalKeyKindMessage, invertedComparators, isDateLiteral, keywordDomains, keywordModule, limitOf, lookaheadIsFinalizing, maxComparators, maybeParseTupleExpression, minComparators, multipleVariadicMesage, nonLeadingSpreadError, object, optionalOrDefaultableAfterVariadicMessage, parseBound, parseBrand, parseDefault, parseDivisor, parseEnclosed, parseGenericArgs, parseGenericInstantiation, parseGenericParamName, parseInnerDefinition, parseKeyOfTuple, parseMorphTuple, parseNarrowTuple, parseObject, parseObjectLiteral, parseOperand, parseOperator, parseProperty, parseRightBound, parseString, parseTuple, parseTupleLiteral, parseUnenclosed, parseUntilFinalizer, preparseKey, requiredPostOptionalMessage, scope, shallowDefaultableMessage, shallowOptionalMessage, shiftComparator, shiftUntilTerminator, spreadDefaultableMessage, spreadOptionalMessage, terminatingChars, tsGenericDefinitions, tsKeywordDefinitions, unknown, untilLookaheadIsClosing, writeAsyncStandardSchemaMessage, writeBadDefinitionTypeMessage, writeDoubleRightBoundMessage, writeExpressionExpectedMessage, writeIncompatibleRangeMessage, writeInvalidConstructorMessage, writeInvalidDivisorMessage, writeInvalidGenericArgCountMessage, writeInvalidLimitMessage, writeInvalidSpreadTypeMessage, writeInvalidUndeclaredBehaviorMessage, writeMalformedFunctionalExpressionMessage, writeMissingOperandMessage, writeMissingRightOperandMessage, writeMultipleLeftBoundsMessage, writeNonArraySpreadMessage, writeNonLiteralDefaultMessage, writeOpenRangeMessage, writeOptionalIndexKeyMessage, writeParameterizedGenericKeyMessage, writePrefixedPrivateReferenceMessage, writeUnexpectedCharacterMessage, writeUnpairableComparatorMessage, writeUnresolvableHint, writeUnresolvedFilterMessage, writeUnterminatedEnclosedMessage } from "./chunk-
|
|
13
|
-
export { InternalFnParser, InternalTypedFn, badFnReturnTypeMessage } from "./chunk-
|
|
8
|
+
export { inferred } from "./chunk-4NZCLVBD.js";
|
|
9
|
+
export { codec } from "./chunk-E4OQHHFS.js";
|
|
10
|
+
import "./chunk-2FVJ5JBN.js";
|
|
11
|
+
export { NFC, NFD, NFKC, NFKD, TypedArray, ark, arkArray, arkBuiltins, arkFormData, arkPrototypes, builtinDefinitions, capitalize, creditCard, declare, define, epoch, fn, generic, integer, ip, json, keywords, match, normalize, normalizedForms, number, prototypeDefinitions, regexStringNode, schema, string, stringDate, stringInteger, stringNumeric, tryParseDatePattern, type, url, uuid } from "./chunk-3WYMLH45.js";
|
|
12
|
+
export { $arkTypeRegistry, Generic, InternalChainedMatchParser, InternalMatchParser, InternalScope, InternalTypeParser, RecordHkt, RuntimeState, Scope, Type, arkTsGenerics, arkTsKeywords, arrayIsNotGenericHint, assertTupleArity, chainedAtMessage, checkWrittenIntersection, comparatorStartChars, comparators, defaultablePostOptionalMessage, deferDefinition, deferUnion, deferUnits, deferredRecord, doubleAtMessage, emptyGenericParameterMessage, enclosingChar, enclosingLiteralTokens, enclosingQuote, enclosingRegexTokens, enclosingTokens, extractDateLiteralSource, finalizingLookaheads, foreignAliases, fullStringParse, getBoundKinds, incompleteArrayTokenMessage, invalidDefaultableKeyKindMessage, invalidOptionalKeyKindMessage, invertedComparators, isDateLiteral, keywordDomains, keywordModule, limitOf, lookaheadIsFinalizing, maxComparators, maybeParseTupleExpression, minComparators, multipleVariadicMesage, nonLeadingSpreadError, object, optionalOrDefaultableAfterVariadicMessage, parseBound, parseBrand, parseDefault, parseDivisor, parseEnclosed, parseGenericArgs, parseGenericInstantiation, parseGenericParamName, parseInnerDefinition, parseKeyOfTuple, parseMorphTuple, parseNarrowTuple, parseObject, parseObjectLiteral, parseOperand, parseOperator, parseProperty, parseRightBound, parseString, parseTuple, parseTupleLiteral, parseUnenclosed, parseUntilFinalizer, preparseKey, requiredPostOptionalMessage, scope, shallowDefaultableMessage, shallowOptionalMessage, shiftComparator, shiftUntilTerminator, spreadDefaultableMessage, spreadOptionalMessage, terminatingChars, tsGenericDefinitions, tsKeywordDefinitions, unknown, untilLookaheadIsClosing, writeAsyncStandardSchemaMessage, writeBadDefinitionTypeMessage, writeDoubleRightBoundMessage, writeExpressionExpectedMessage, writeIncompatibleRangeMessage, writeInvalidConstructorMessage, writeInvalidDivisorMessage, writeInvalidGenericArgCountMessage, writeInvalidLimitMessage, writeInvalidSpreadTypeMessage, writeInvalidUndeclaredBehaviorMessage, writeMalformedFunctionalExpressionMessage, writeMissingOperandMessage, writeMissingRightOperandMessage, writeMultipleLeftBoundsMessage, writeNonArraySpreadMessage, writeNonLiteralDefaultMessage, writeOpenRangeMessage, writeOptionalIndexKeyMessage, writeParameterizedGenericKeyMessage, writePrefixedPrivateReferenceMessage, writeUnexpectedCharacterMessage, writeUnexpectedTupleElementsMessage, writeUnpairableComparatorMessage, writeUnresolvableHint, writeUnresolvedFilterMessage, writeUnterminatedEnclosedMessage } from "./chunk-TM22D5DL.js";
|
|
13
|
+
export { InternalFnParser, InternalTypedFn, badFnReturnTypeMessage } from "./chunk-4FTHWK63.js";
|
|
14
14
|
export { Hkt } from "./chunk-BDJVONP7.js";
|
|
15
|
-
export { configure } from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
export { UndetailedErrors } from "./chunk-
|
|
18
|
-
export { de } from "./chunk-
|
|
19
|
-
export { en } from "./chunk-
|
|
20
|
-
export { keywordMeta, keywordPhrases } from "./chunk-
|
|
15
|
+
export { configure } from "./chunk-BWKJV74G.js";
|
|
16
|
+
import "./chunk-XVLEFUSY.js";
|
|
17
|
+
export { UndetailedErrors } from "./chunk-5FNHK7CC.js";
|
|
18
|
+
export { de } from "./chunk-4J7H2ELX.js";
|
|
19
|
+
export { en } from "./chunk-JIILWIU4.js";
|
|
20
|
+
export { keywordMeta, keywordPhrases } from "./chunk-4MUH2MO4.js";
|
|
21
21
|
import "./chunk-22RQSVV3.js";
|
|
22
22
|
import "./chunk-XLG66ZDF.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
export { capitalizeString, emptyCollectionDefaults, epochDescriptions, isEpochString, isJsonString, isLuhnValid, isParsableDate, isParsableUrl, isRegexPattern, keepFormatted, lowercaseString, maxEpoch, normalizationsByForm, parseDate, parseEpoch, parseFormData, parseInteger, parseIsoDate, parseJson, parseNumeric, parseUrl, parsesFinite, raisedErrorPhrases, stringifyJson, trimString, uppercaseString, writeEpoch, writeIsoDate,
|
|
27
|
-
export { registerPrecompiledUnits } from "./chunk-
|
|
23
|
+
import "./chunk-H44UG6HG.js";
|
|
24
|
+
import "./chunk-AMNHRY72.js";
|
|
25
|
+
import "./chunk-LMUBBBHJ.js";
|
|
26
|
+
export { capitalizeString, emptyCollectionDefaults, epochDescriptions, isEpochString, isJsonString, isLuhnValid, isParsableDate, isParsableUrl, isRegexPattern, keepFormatted, lowercaseString, maxEpoch, normalizationsByForm, parseDate, parseEpoch, parseFormData, parseInteger, parseIsoDate, parseJson, parseNumeric, parseUrl, parsesFinite, raisedErrorPhrases, stringifyJson, trimString, uppercaseString, writeEpoch, writeIsoDate, writeUrl } from "./chunk-4HREHNIV.js";
|
|
27
|
+
export { registerPrecompiledUnits } from "./chunk-7SUZFAHZ.js";
|
|
28
28
|
import "./chunk-CWSF57VM.js";
|
|
29
|
-
import "./chunk-
|
|
30
|
-
export { iso8601Matcher } from "./chunk-
|
|
31
|
-
export { annotatingFallback } from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
29
|
+
import "./chunk-UJJGG4VQ.js";
|
|
30
|
+
export { iso8601Matcher } from "./chunk-US6BWOGJ.js";
|
|
31
|
+
export { annotatingFallback } from "./chunk-P3HEEGB5.js";
|
|
32
|
+
import "./chunk-W2XOI5DY.js";
|
|
33
33
|
import "./chunk-TACLEIDM.js";
|
|
34
|
-
import "./chunk-
|
|
35
|
-
import "./chunk-
|
|
36
|
-
export { ArkErrors, ThrownErrors as TraversalError, byAncestorPath, byPath, describeCause, describeMissing, firstIssue, flatByPath, flatMessagesByPath, groupByPath, labelOf, messageIn, writeKeywordExpected } from "./chunk-
|
|
37
|
-
export { Traversal, printedActualOf } from "./chunk-
|
|
38
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-ERGIJZFA.js";
|
|
35
|
+
import "./chunk-TQYLOZRT.js";
|
|
36
|
+
export { ArkErrors, ThrownErrors as TraversalError, byAncestorPath, byPath, describeCause, describeMissing, firstIssue, flatByPath, flatMessagesByPath, groupByPath, labelOf, messageIn, writeKeywordExpected } from "./chunk-I65VSWGS.js";
|
|
37
|
+
export { Traversal, printedActualOf } from "./chunk-3KBOPH3J.js";
|
|
38
|
+
import "./chunk-J2BFVWVY.js";
|
|
39
39
|
export { isolate, listPattern } from "./chunk-3SH2BQ4T.js";
|
|
40
|
-
export { ParseError } from "./chunk-
|
|
40
|
+
export { ParseError } from "./chunk-3HZC67MT.js";
|
|
41
41
|
import "./chunk-I2KLQ2HA.js";
|
package/out/island.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import "./chunk-
|
|
2
|
-
import "./chunk-
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
1
|
+
import "./chunk-CXHXN7DF.js";
|
|
2
|
+
import "./chunk-BWKJV74G.js";
|
|
3
|
+
import "./chunk-XVLEFUSY.js";
|
|
4
|
+
import "./chunk-5FNHK7CC.js";
|
|
5
|
+
import "./chunk-AMNHRY72.js";
|
|
6
|
+
import "./chunk-LMUBBBHJ.js";
|
|
7
|
+
import "./chunk-4HREHNIV.js";
|
|
8
|
+
import "./chunk-7SUZFAHZ.js";
|
|
9
9
|
import "./chunk-CWSF57VM.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-UJJGG4VQ.js";
|
|
11
|
+
import "./chunk-US6BWOGJ.js";
|
|
12
|
+
import "./chunk-P3HEEGB5.js";
|
|
13
|
+
import "./chunk-W2XOI5DY.js";
|
|
14
14
|
import "./chunk-TACLEIDM.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-ERGIJZFA.js";
|
|
16
|
+
import "./chunk-TQYLOZRT.js";
|
|
17
|
+
import "./chunk-I65VSWGS.js";
|
|
18
|
+
import "./chunk-3KBOPH3J.js";
|
|
19
|
+
import "./chunk-J2BFVWVY.js";
|
|
20
20
|
import "./chunk-3SH2BQ4T.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-3HZC67MT.js";
|
|
22
22
|
import "./chunk-I2KLQ2HA.js";
|
package/out/islandDependency.js
CHANGED
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import "./chunk-
|
|
2
|
-
export { ConfiguredWriter, DataParts, StandaloneArtifact, addIssueFeatures, appendPath, appliedSignature, assertBakeableJsonSchema, assertDescribed, assertReportsIssues, bakedRootsOf, bakingOf, basesOf, bindingsOf, boundApplierOf, calledMembersOf, canPipe, cellPrefix, cellSetterOf, cellSpecifierOf, collectDefaults, combines, compiledForSize, contentKeyOf, contentNodesOf, creatorSourceOf, declares, defaultBakedLimit, defaultMembers, defaultedNodeKeys, discriminantContextOf, encodeKey, failureSites, failureSources, fallbackCodes, forwardedOf, frozen, fusedApplierOf, heldSpecifier, holdsDefaults, holdsLocal, holdsObjectMeta, holdsOnlyMeta, holeNameIn, holeNamePattern, internsByHolder, introspectionMembers, invalidErrorsOf, isChecker, isCheckerIn, isCreatedByRuntime, isDescribed, isHole, isInlineSite, isKeyword, isLiteralSite, isPlainLiteral, isReadByName, isSharedUnit, isTypedFn, isVariadicArray, isWriting, issueContextOf, issueSite, issueSiteOf, jsonVariantOf, keyOf, keywordMetas, kindNameOf, listedIssueOf, listsBranches, madeApplierOf, mergeUnits, missingDescriptionOf, namesReadBy, noInlineOf, noIssueFeatures, originalOf, partsOf, preciseFormOf, precompileStandalone, precompileStandaloneModules, printablePrimitive, printedHoleNamePattern, raisedWritersByCode, raisesNothing, raisingKeys, readWritten, receiverPrefix, refNameOf, registeredNameAt, returnedOf, rootUnitsOf, runtimeImport, runtimeKeyOf, runtimePathsByValue, shapedForSize, totalBaked, traceFallbacks, traversalKeyOf, uncountedJsonOf, unifies, unionKeySiteOf, unitOf, wholeReads, withoutStrings, writeBakedLimitMessage, writeCombinator, writeDependencies, writeFixConfig, writeFunction, writeId, writeImports, writeLazyRead, writeModule, writeReplay, writeScope, writeSections, writeSiteOf, writeUnprecompilableMessage, writeValue, writtenAttributesOf, writtenByUnits, writtenSelectedOf } from "./chunk-
|
|
1
|
+
import "./chunk-CXHXN7DF.js";
|
|
2
|
+
export { ConfiguredWriter, DataParts, StandaloneArtifact, addIssueFeatures, appendPath, appliedSignature, assertBakeableJsonSchema, assertDescribed, assertReportsIssues, bakedRootsOf, bakingOf, basesOf, bindingsOf, boundApplierOf, calledMembersOf, canPipe, cellPrefix, cellSetterOf, cellSpecifierOf, collectDefaults, combines, compiledForSize, contentKeyOf, contentNodesOf, creatorSourceOf, declares, defaultBakedLimit, defaultMembers, defaultedNodeKeys, discriminantContextOf, encodeKey, failureSites, failureSources, fallbackCodes, forwardedOf, frozen, fusedApplierOf, heldSpecifier, holdsDefaults, holdsLocal, holdsObjectMeta, holdsOnlyMeta, holeNameIn, holeNamePattern, internsByHolder, introspectionMembers, invalidErrorsOf, isChecker, isCheckerIn, isCreatedByRuntime, isDescribed, isHole, isInlineSite, isKeyword, isLiteralSite, isPlainLiteral, isReadByName, isSharedUnit, isTypedFn, isVariadicArray, isWriting, issueContextOf, issueSite, issueSiteOf, jsonVariantOf, keyOf, keywordMetas, kindNameOf, listedIssueOf, listsBranches, madeApplierOf, mergeUnits, missingDescriptionOf, namesReadBy, noInlineOf, noIssueFeatures, originalOf, partsOf, preciseFormOf, precompileStandalone, precompileStandaloneModules, printablePrimitive, printedHoleNamePattern, raisedWritersByCode, raisesNothing, raisingKeys, readWritten, receiverPrefix, refNameOf, registeredNameAt, returnedOf, rootUnitsOf, runtimeImport, runtimeKeyOf, runtimePathsByValue, shapedForSize, totalBaked, traceFallbacks, traversalKeyOf, uncountedJsonOf, unifies, unionKeySiteOf, unitOf, wholeReads, withoutStrings, writeBakedLimitMessage, writeCombinator, writeDependencies, writeFixConfig, writeFunction, writeId, writeImports, writeLazyRead, writeModule, writeReplay, writeScope, writeSections, writeSiteOf, writeUnprecompilableMessage, writeValue, writtenAttributesOf, writtenByUnits, writtenSelectedOf } from "./chunk-54U3D6OV.js";
|
|
3
3
|
import "./chunk-LHNEY6QW.js";
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
export { BoundModule, Module, fromJsonSchema } from "./chunk-
|
|
4
|
+
import "./chunk-BQR65UPE.js";
|
|
5
|
+
import "./chunk-RKJNLXEQ.js";
|
|
6
|
+
import "./chunk-46PLKNON.js";
|
|
7
|
+
export { BoundModule, Module, fromJsonSchema } from "./chunk-YPN67JMD.js";
|
|
8
8
|
export { regex } from "./chunk-F5BACUJS.js";
|
|
9
|
-
export { inferred } from "./chunk-
|
|
10
|
-
export { codec } from "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
export { NFC, NFD, NFKC, NFKD, TypedArray, ark, arkArray, arkBuiltins, arkFormData, arkPrototypes, builtinDefinitions, capitalize, creditCard, declare, define, epoch, fn, generic, integer, ip, json, keywords, match, normalize, normalizedForms, number, prototypeDefinitions, regexStringNode, schema, string, stringDate, stringInteger, stringNumeric, tryParseDatePattern, type, url, uuid } from "./chunk-
|
|
13
|
-
export { $arkTypeRegistry, Generic, InternalChainedMatchParser, InternalMatchParser, InternalScope, InternalTypeParser, RecordHkt, RuntimeState, Scope, Type, arkTsGenerics, arkTsKeywords, arrayIsNotGenericHint, chainedAtMessage, checkWrittenIntersection, comparatorStartChars, comparators, defaultablePostOptionalMessage, deferDefinition, deferUnion, deferUnits, deferredRecord, doubleAtMessage, emptyGenericParameterMessage, enclosingChar, enclosingLiteralTokens, enclosingQuote, enclosingRegexTokens, enclosingTokens, extractDateLiteralSource, finalizingLookaheads, foreignAliases, fullStringParse, getBoundKinds, incompleteArrayTokenMessage, invalidDefaultableKeyKindMessage, invalidOptionalKeyKindMessage, invertedComparators, isDateLiteral, keywordDomains, keywordModule, limitOf, lookaheadIsFinalizing, maxComparators, maybeParseTupleExpression, minComparators, multipleVariadicMesage, nonLeadingSpreadError, object, optionalOrDefaultableAfterVariadicMessage, parseBound, parseBrand, parseDefault, parseDivisor, parseEnclosed, parseGenericArgs, parseGenericInstantiation, parseGenericParamName, parseInnerDefinition, parseKeyOfTuple, parseMorphTuple, parseNarrowTuple, parseObject, parseObjectLiteral, parseOperand, parseOperator, parseProperty, parseRightBound, parseString, parseTuple, parseTupleLiteral, parseUnenclosed, parseUntilFinalizer, preparseKey, requiredPostOptionalMessage, scope, shallowDefaultableMessage, shallowOptionalMessage, shiftComparator, shiftUntilTerminator, spreadDefaultableMessage, spreadOptionalMessage, terminatingChars, tsGenericDefinitions, tsKeywordDefinitions, unknown, untilLookaheadIsClosing, writeAsyncStandardSchemaMessage, writeBadDefinitionTypeMessage, writeDoubleRightBoundMessage, writeExpressionExpectedMessage, writeIncompatibleRangeMessage, writeInvalidConstructorMessage, writeInvalidDivisorMessage, writeInvalidGenericArgCountMessage, writeInvalidLimitMessage, writeInvalidSpreadTypeMessage, writeInvalidUndeclaredBehaviorMessage, writeMalformedFunctionalExpressionMessage, writeMissingOperandMessage, writeMissingRightOperandMessage, writeMultipleLeftBoundsMessage, writeNonArraySpreadMessage, writeNonLiteralDefaultMessage, writeOpenRangeMessage, writeOptionalIndexKeyMessage, writeParameterizedGenericKeyMessage, writePrefixedPrivateReferenceMessage, writeUnexpectedCharacterMessage, writeUnpairableComparatorMessage, writeUnresolvableHint, writeUnresolvedFilterMessage, writeUnterminatedEnclosedMessage } from "./chunk-
|
|
14
|
-
export { InternalFnParser, InternalTypedFn, badFnReturnTypeMessage } from "./chunk-
|
|
9
|
+
export { inferred } from "./chunk-4NZCLVBD.js";
|
|
10
|
+
export { codec } from "./chunk-E4OQHHFS.js";
|
|
11
|
+
import "./chunk-2FVJ5JBN.js";
|
|
12
|
+
export { NFC, NFD, NFKC, NFKD, TypedArray, ark, arkArray, arkBuiltins, arkFormData, arkPrototypes, builtinDefinitions, capitalize, creditCard, declare, define, epoch, fn, generic, integer, ip, json, keywords, match, normalize, normalizedForms, number, prototypeDefinitions, regexStringNode, schema, string, stringDate, stringInteger, stringNumeric, tryParseDatePattern, type, url, uuid } from "./chunk-3WYMLH45.js";
|
|
13
|
+
export { $arkTypeRegistry, Generic, InternalChainedMatchParser, InternalMatchParser, InternalScope, InternalTypeParser, RecordHkt, RuntimeState, Scope, Type, arkTsGenerics, arkTsKeywords, arrayIsNotGenericHint, assertTupleArity, chainedAtMessage, checkWrittenIntersection, comparatorStartChars, comparators, defaultablePostOptionalMessage, deferDefinition, deferUnion, deferUnits, deferredRecord, doubleAtMessage, emptyGenericParameterMessage, enclosingChar, enclosingLiteralTokens, enclosingQuote, enclosingRegexTokens, enclosingTokens, extractDateLiteralSource, finalizingLookaheads, foreignAliases, fullStringParse, getBoundKinds, incompleteArrayTokenMessage, invalidDefaultableKeyKindMessage, invalidOptionalKeyKindMessage, invertedComparators, isDateLiteral, keywordDomains, keywordModule, limitOf, lookaheadIsFinalizing, maxComparators, maybeParseTupleExpression, minComparators, multipleVariadicMesage, nonLeadingSpreadError, object, optionalOrDefaultableAfterVariadicMessage, parseBound, parseBrand, parseDefault, parseDivisor, parseEnclosed, parseGenericArgs, parseGenericInstantiation, parseGenericParamName, parseInnerDefinition, parseKeyOfTuple, parseMorphTuple, parseNarrowTuple, parseObject, parseObjectLiteral, parseOperand, parseOperator, parseProperty, parseRightBound, parseString, parseTuple, parseTupleLiteral, parseUnenclosed, parseUntilFinalizer, preparseKey, requiredPostOptionalMessage, scope, shallowDefaultableMessage, shallowOptionalMessage, shiftComparator, shiftUntilTerminator, spreadDefaultableMessage, spreadOptionalMessage, terminatingChars, tsGenericDefinitions, tsKeywordDefinitions, unknown, untilLookaheadIsClosing, writeAsyncStandardSchemaMessage, writeBadDefinitionTypeMessage, writeDoubleRightBoundMessage, writeExpressionExpectedMessage, writeIncompatibleRangeMessage, writeInvalidConstructorMessage, writeInvalidDivisorMessage, writeInvalidGenericArgCountMessage, writeInvalidLimitMessage, writeInvalidSpreadTypeMessage, writeInvalidUndeclaredBehaviorMessage, writeMalformedFunctionalExpressionMessage, writeMissingOperandMessage, writeMissingRightOperandMessage, writeMultipleLeftBoundsMessage, writeNonArraySpreadMessage, writeNonLiteralDefaultMessage, writeOpenRangeMessage, writeOptionalIndexKeyMessage, writeParameterizedGenericKeyMessage, writePrefixedPrivateReferenceMessage, writeUnexpectedCharacterMessage, writeUnexpectedTupleElementsMessage, writeUnpairableComparatorMessage, writeUnresolvableHint, writeUnresolvedFilterMessage, writeUnterminatedEnclosedMessage } from "./chunk-TM22D5DL.js";
|
|
14
|
+
export { InternalFnParser, InternalTypedFn, badFnReturnTypeMessage } from "./chunk-4FTHWK63.js";
|
|
15
15
|
export { Hkt } from "./chunk-BDJVONP7.js";
|
|
16
|
-
export { configure } from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
export { UndetailedErrors } from "./chunk-
|
|
19
|
-
export { de } from "./chunk-
|
|
20
|
-
export { en } from "./chunk-
|
|
21
|
-
export { keywordMeta, keywordPhrases } from "./chunk-
|
|
16
|
+
export { configure } from "./chunk-BWKJV74G.js";
|
|
17
|
+
import "./chunk-XVLEFUSY.js";
|
|
18
|
+
export { UndetailedErrors } from "./chunk-5FNHK7CC.js";
|
|
19
|
+
export { de } from "./chunk-4J7H2ELX.js";
|
|
20
|
+
export { en } from "./chunk-JIILWIU4.js";
|
|
21
|
+
export { keywordMeta, keywordPhrases } from "./chunk-4MUH2MO4.js";
|
|
22
22
|
import "./chunk-22RQSVV3.js";
|
|
23
23
|
import "./chunk-XLG66ZDF.js";
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
export { capitalizeString, emptyCollectionDefaults, epochDescriptions, isEpochString, isJsonString, isLuhnValid, isParsableDate, isParsableUrl, isRegexPattern, keepFormatted, lowercaseString, maxEpoch, normalizationsByForm, parseDate, parseEpoch, parseFormData, parseInteger, parseIsoDate, parseJson, parseNumeric, parseUrl, parsesFinite, raisedErrorPhrases, stringifyJson, trimString, uppercaseString, writeEpoch, writeIsoDate,
|
|
28
|
-
export { registerPrecompiledUnits } from "./chunk-
|
|
24
|
+
import "./chunk-H44UG6HG.js";
|
|
25
|
+
import "./chunk-AMNHRY72.js";
|
|
26
|
+
import "./chunk-LMUBBBHJ.js";
|
|
27
|
+
export { capitalizeString, emptyCollectionDefaults, epochDescriptions, isEpochString, isJsonString, isLuhnValid, isParsableDate, isParsableUrl, isRegexPattern, keepFormatted, lowercaseString, maxEpoch, normalizationsByForm, parseDate, parseEpoch, parseFormData, parseInteger, parseIsoDate, parseJson, parseNumeric, parseUrl, parsesFinite, raisedErrorPhrases, stringifyJson, trimString, uppercaseString, writeEpoch, writeIsoDate, writeUrl } from "./chunk-4HREHNIV.js";
|
|
28
|
+
export { registerPrecompiledUnits } from "./chunk-7SUZFAHZ.js";
|
|
29
29
|
import "./chunk-CWSF57VM.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
export { iso8601Matcher } from "./chunk-
|
|
32
|
-
export { annotatingFallback } from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-UJJGG4VQ.js";
|
|
31
|
+
export { iso8601Matcher } from "./chunk-US6BWOGJ.js";
|
|
32
|
+
export { annotatingFallback } from "./chunk-P3HEEGB5.js";
|
|
33
|
+
import "./chunk-W2XOI5DY.js";
|
|
34
34
|
import "./chunk-TACLEIDM.js";
|
|
35
|
-
import "./chunk-
|
|
36
|
-
import "./chunk-
|
|
37
|
-
export { ArkErrors, ThrownErrors as TraversalError, byAncestorPath, byPath, describeCause, describeMissing, firstIssue, flatByPath, flatMessagesByPath, groupByPath, labelOf, messageIn, writeKeywordExpected } from "./chunk-
|
|
38
|
-
export { Traversal, printedActualOf } from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-ERGIJZFA.js";
|
|
36
|
+
import "./chunk-TQYLOZRT.js";
|
|
37
|
+
export { ArkErrors, ThrownErrors as TraversalError, byAncestorPath, byPath, describeCause, describeMissing, firstIssue, flatByPath, flatMessagesByPath, groupByPath, labelOf, messageIn, writeKeywordExpected } from "./chunk-I65VSWGS.js";
|
|
38
|
+
export { Traversal, printedActualOf } from "./chunk-3KBOPH3J.js";
|
|
39
|
+
import "./chunk-J2BFVWVY.js";
|
|
40
40
|
export { isolate, listPattern } from "./chunk-3SH2BQ4T.js";
|
|
41
|
-
export { ParseError } from "./chunk-
|
|
41
|
+
export { ParseError } from "./chunk-3HZC67MT.js";
|
|
42
42
|
import "./chunk-I2KLQ2HA.js";
|
|
@@ -10,7 +10,11 @@ export type inferJsonSchema<schema, root = schema> = {
|
|
|
10
10
|
export type inferWidened<schema> = [
|
|
11
11
|
schema
|
|
12
12
|
] extends [anyOrNever] ? schema : unknown;
|
|
13
|
-
export type inferSchema<schema, root, seen> = {} extends schema ? inferWidened<schema> : schema extends StringSchema ? schema["type"] extends "string" ? string : unknown : schema extends NumberSchema ? number : schema extends BooleanSchema ? boolean : schema extends NullSchema ? null : schema extends ObjectSchema ? inferObject<schema, root> : schema extends ArraySchema ? inferArray<schema, root, seen> : schema extends RefOnlySchema ? inferRef<schema["$ref"], root, seen> : schema extends boolean ? schema extends true ? unknown : never : (schema extends RefNode ? draftsOf<root> : "2020-12") extends "2020-12" ? inferNode<schema, schema extends IdentifiedSchema ? rootOf<schema, root> : root, keyof schema & PartKeyword, seen> :
|
|
13
|
+
export type inferSchema<schema, root, seen> = {} extends schema ? inferWidened<schema> : schema extends StringSchema ? schema["type"] extends "string" ? string : unknown : schema extends NumberSchema ? number : schema extends BooleanSchema ? boolean : schema extends NullSchema ? null : schema extends ObjectSchema ? inferObject<schema, root> : schema extends ArraySchema ? inferArray<schema, root, seen> : schema extends RefOnlySchema ? inferRef<schema["$ref"], root, seen> : schema extends boolean ? schema extends true ? unknown : never : (schema extends RefNode ? draftsOf<root> : "2020-12") extends "2020-12" ? inferNode<schema, schema extends IdentifiedSchema ? rootOf<schema, root> : root, keyof schema & PartKeyword, seen> : inferLegacyRef<schema, root, seen>;
|
|
14
|
+
/** before 2019-09, a `$ref`'s siblings are ignored; a widened `$schema` may
|
|
15
|
+
* also be 2020-12, where a standalone `nullable` widens the target with `null` */
|
|
16
|
+
export type inferLegacyRef<schema, root, seen> = applyLegacyNullable<schema, root, inferRef<schema["$ref" & keyof schema], resourceOf<schema, root>, seen>>;
|
|
17
|
+
export type applyLegacyNullable<schema, root, t> = "2020-12" extends draftsOf<root> ? schema extends NonNullableNode | DefinedTypedSchema ? t : applyNullable<schema, t> : t;
|
|
14
18
|
/** excludes `nullable`, including from an index signature that may hold it,
|
|
15
19
|
* which an optional `nullable?: never` wouldn't */
|
|
16
20
|
export interface NonNullableNode {
|
|
@@ -160,6 +164,11 @@ export type inferBase<schema, root, seen> = schema extends TypeListSchema ? appl
|
|
|
160
164
|
export interface TypedSchema {
|
|
161
165
|
type: unknown;
|
|
162
166
|
}
|
|
167
|
+
/** a schema whose `type` is definitely present, so `nullable` adds `null` to
|
|
168
|
+
* that `type` rather than unioning the whole schema with `null` */
|
|
169
|
+
export interface DefinedTypedSchema {
|
|
170
|
+
type: {};
|
|
171
|
+
}
|
|
163
172
|
export interface TypeListSchema {
|
|
164
173
|
type: array;
|
|
165
174
|
}
|
|
@@ -204,8 +213,9 @@ export interface ConditionalSchema {
|
|
|
204
213
|
then: unknown;
|
|
205
214
|
else: unknown;
|
|
206
215
|
}
|
|
207
|
-
export type applyModifiers<schema, t> = schema extends
|
|
208
|
-
export
|
|
216
|
+
export type applyModifiers<schema, t> = schema extends NonNullableNode | DefinedTypedSchema ? applyNotModifier<schema, t> : applyNullable<schema, applyNotModifier<schema, t>>;
|
|
217
|
+
export type applyNotModifier<schema, t> = schema extends NegatedSchema ? skipsNot<schema["not"], schema> extends true ? t : applyNot<schema["not"], t> : t;
|
|
218
|
+
export interface UnmodifiedNode extends NonNullableNode {
|
|
209
219
|
not?: never;
|
|
210
220
|
[k: string]: unknown;
|
|
211
221
|
}
|
|
@@ -268,9 +278,9 @@ export type TypeDomains = {
|
|
|
268
278
|
export type JsonObject = object & {
|
|
269
279
|
length?: never;
|
|
270
280
|
};
|
|
271
|
-
/** OpenAPI 3.0's `nullable` adds `null` to the `type` beside it
|
|
272
|
-
*
|
|
273
|
-
*
|
|
281
|
+
/** OpenAPI 3.0's `nullable` adds `null` to the `type` beside it (so other
|
|
282
|
+
* keywords still filter it, like ajv), or unions the whole schema with `null`
|
|
283
|
+
* when no `type` is present. `nullable` might be `true` (a widened `boolean`
|
|
274
284
|
* or an optional keyword) */
|
|
275
285
|
export type applyNullable<schema, t> = true extends schema["nullable" & keyof schema] ? t | null : t;
|
|
276
286
|
/** a widened name (including `any`) may be any type */
|
|
@@ -35,7 +35,7 @@ export type closedKeywordsOf<schema> = {
|
|
|
35
35
|
};
|
|
36
36
|
export type validateMember<schema, root, position extends SchemaPosition> = schema extends boolean ? schema : schema extends array ? ErrorMessage<writeInvalidSchemaMessage<"array">> : schema extends IdentifiedSchema ? validateKeywords<schema, position extends "document" ? schema : rootOf<schema, root>, position> : schema extends object ? validateKeywords<schema, root, position> : ErrorMessage<writeInvalidSchemaMessage<domainOf<schema>>>;
|
|
37
37
|
export type validateKeywords<schema, root, position extends SchemaPosition> = {
|
|
38
|
-
[k in keyof schema | KeywordName]?: k extends keyof schema ? k extends ValidatedKeyword ? (k extends "type" ? validateTypeKeyword<schema[k]> : k extends "required" ? position extends "branch" ? completeRequired<schema[k], schema> : schema extends SelfContainedSchema ? validateRequired<schema[k], propertyKeyOf<schema["properties"]>> : completeRequired<schema[k], schema> : k extends "properties" ? validateSchemaRecord<schema[k], root, propertyPositionOf<schema, position>> : k extends "additionalProperties" ? validateSchema<schema[k], root, propertyPositionOf<schema, position>> : k extends "items" ? validateItems<schema[k], root, itemPositionOf<schema, position>> : k extends "prefixItems" ? validateSchemaList<schema[k], root, itemPositionOf<schema, position>> : k extends SchemaKeyword | BranchKeyword ? validateSchema<schema[k], root, "branch"> : k extends CompositionKeyword ? validateSchemaList<schema[k], root, "branch"> : k extends "$ref" ? validateRef<schema[k], root> : k extends CountKeyword ? validateCount<schema[k], k> : k extends "multipleOf" ? validateMultipleOf<schema[k]> : k extends keyof KeywordValueTypes ? KeywordValueTypes[k] : k extends SchemaRecordKeyword ? validateSchemaRecord<schema[k], root, "branch"> : k extends "dependencies" ? validateDependencies<schema[k], root> : k extends "dependentRequired" ? validateDependentRequired<schema[k]> : k extends "additionalItems" ? validateSchema<schema[k], root, "branch"> : k extends UnsupportedKeyword ? undefined extends schema[k] ? schema[k] : ErrorMessage<writeUnsupportedKeywordMessage<k>> : k extends ExclusiveBoundKeyword ? schema[k] extends boolean ? ErrorMessage<writeUnsupportedKeywordMessage<`boolean ${k}`>> : schema[k] extends number | boolean | undefined ? schema[k] : number : k extends "propertyNames" ? validatePropertyNames<schema[k], root> : schema[k]) | (undefined extends schema[k] ? undefined : never) : k extends "components" ? position extends "document" ? validateComponents<schema[k], root> : schema[k] : schema[k] : never;
|
|
38
|
+
[k in keyof schema | KeywordName]?: k extends keyof schema ? k extends ValidatedKeyword ? (k extends "type" ? validateTypeKeyword<schema[k]> : k extends "required" ? position extends "branch" ? completeRequired<schema[k], schema> : schema extends SelfContainedSchema ? validateRequired<schema[k], propertyKeyOf<schema["properties"]>> : completeRequired<schema[k], schema> : k extends "properties" ? validateSchemaRecord<schema[k], root, propertyPositionOf<schema, position>> : k extends "additionalProperties" ? validateSchema<schema[k], root, propertyPositionOf<schema, position>> : k extends "items" ? validateItems<schema[k], root, itemPositionOf<schema, position>> : k extends "prefixItems" ? validateSchemaList<schema[k], root, itemPositionOf<schema, position>> : k extends SchemaKeyword | BranchKeyword ? validateSchema<schema[k], root, "branch"> : k extends CompositionKeyword ? validateSchemaList<schema[k], root, "branch"> : k extends "$ref" ? validateRef<schema[k], root> : k extends CountKeyword ? validateCount<schema[k], k> : k extends "multipleOf" ? validateMultipleOf<schema[k]> : k extends "nullable" ? validateNullable<schema[k], schema["type" & keyof schema]> : k extends keyof KeywordValueTypes ? KeywordValueTypes[k] : k extends SchemaRecordKeyword ? validateSchemaRecord<schema[k], root, "branch"> : k extends "dependencies" ? validateDependencies<schema[k], root> : k extends "dependentRequired" ? validateDependentRequired<schema[k]> : k extends "additionalItems" ? validateSchema<schema[k], root, "branch"> : k extends UnsupportedKeyword ? undefined extends schema[k] ? schema[k] : ErrorMessage<writeUnsupportedKeywordMessage<k>> : k extends ExclusiveBoundKeyword ? schema[k] extends boolean ? ErrorMessage<writeUnsupportedKeywordMessage<`boolean ${k}`>> : schema[k] extends number | boolean | undefined ? schema[k] : number : k extends "propertyNames" ? validatePropertyNames<schema[k], root> : schema[k]) | (undefined extends schema[k] ? undefined : never) : k extends "components" ? position extends "document" ? validateComponents<schema[k], root> : schema[k] : schema[k] : never;
|
|
39
39
|
};
|
|
40
40
|
export type validateSchemaRecord<schemas, root, position extends SchemaPosition> = schemas extends array ? {
|
|
41
41
|
readonly [k: string]: boolean | object;
|
|
@@ -92,6 +92,9 @@ export type completeRequired<keys, schema> = keys extends array<string> ? {
|
|
|
92
92
|
export type validateEntry<value, entry> = value extends entry ? value : value extends string ? string extends value ? value : entry : entry;
|
|
93
93
|
export type validateCount<n, keyword extends string> = n extends number ? checkCount<n> extends never ? ErrorMessage<writeInvalidCountMessage<keyword, n>> : n : number;
|
|
94
94
|
export type validateMultipleOf<n> = n extends number ? checkMultipleOf<n> extends never ? ErrorMessage<writeInvalidMultipleOfMessage<n>> : n : number;
|
|
95
|
+
export type validateNullable<nullable, type> = [
|
|
96
|
+
nullable
|
|
97
|
+
] extends [anyOrNever] ? nullable : [nullable] extends [false] ? includesNullType<type> extends true ? ErrorMessage<NonNullableNullMessage> : false : boolean;
|
|
95
98
|
export type validateRef<ref, root> = ref extends LocalRef ? resolveRef<ref, root> extends UnresolvedRef ? {} extends Record<ref, 0> ? ref : root extends UnresolvedRef ? ref : ref extends PercentEncodedRef ? ref : "#" | definitionRefOf<root> : ref : ref extends "" ? ref | "#" | definitionRefOf<root> : ref extends string ? ref : string;
|
|
96
99
|
/** a percent-encoded ref, which isn't decoded and is accepted like a widened
|
|
97
100
|
* ref */
|
|
@@ -165,13 +168,13 @@ export type KeywordValueTypes = {
|
|
|
165
168
|
pattern: string | RegExp;
|
|
166
169
|
format: string;
|
|
167
170
|
uniqueItems: boolean;
|
|
168
|
-
nullable: boolean;
|
|
169
171
|
};
|
|
170
|
-
export type ValidatedKeyword = SchemaKeyword | BranchKeyword | CompositionKeyword | SchemaRecordKeyword | CountKeyword | keyof KeywordValueTypes | "type" | "required" | "items" | "prefixItems" | "$ref" | "multipleOf" | "dependencies" | "dependentRequired" | "additionalItems" | UnsupportedKeyword | ExclusiveBoundKeyword | "propertyNames";
|
|
172
|
+
export type ValidatedKeyword = SchemaKeyword | BranchKeyword | CompositionKeyword | SchemaRecordKeyword | CountKeyword | keyof KeywordValueTypes | "type" | "required" | "items" | "prefixItems" | "$ref" | "multipleOf" | "nullable" | "dependencies" | "dependentRequired" | "additionalItems" | UnsupportedKeyword | ExclusiveBoundKeyword | "propertyNames";
|
|
171
173
|
export type KeywordName = ValidatedKeyword | AnnotationKeyword | "const" | "$schema" | "$id" | "$anchor" | "$dynamicAnchor" | "$vocabulary" | "contentEncoding" | "contentMediaType";
|
|
172
174
|
/** schemas whose validity can be checked without generic instantiations */
|
|
173
175
|
export type StaticallyValidSchema = boolean | StaticallyValidSchemaObject;
|
|
174
176
|
export interface StaticallyValidSchemaObject extends ContextFreeKeywords {
|
|
177
|
+
nullable?: true;
|
|
175
178
|
required?: never;
|
|
176
179
|
$ref?: never;
|
|
177
180
|
multipleOf?: never;
|
|
@@ -220,7 +223,6 @@ export interface ContextFreeKeywords {
|
|
|
220
223
|
pattern?: string | RegExp;
|
|
221
224
|
format?: string;
|
|
222
225
|
uniqueItems?: boolean;
|
|
223
|
-
nullable?: boolean;
|
|
224
226
|
const?: unknown;
|
|
225
227
|
title?: unknown;
|
|
226
228
|
description?: unknown;
|
|
@@ -270,6 +272,7 @@ export interface DependentRequired {
|
|
|
270
272
|
/** a schema object whose keywords are checked in a single pass, falling back
|
|
271
273
|
* to validateKeywords for errors if any check fails */
|
|
272
274
|
export interface ValidSchemaObject<schema extends KeywordObject, root> extends ContextFreeKeywords {
|
|
275
|
+
nullable?: checkNullable<schema["nullable"], schema["type"]>;
|
|
273
276
|
required?: array<keyof schema["properties"] & string>;
|
|
274
277
|
$ref?: checkRef<schema["$ref"], root>;
|
|
275
278
|
multipleOf?: checkMultipleOf<schema["multipleOf"]>;
|
|
@@ -338,6 +341,14 @@ export type NonCountString = `-${string}` | `${string}${"." | "e"}${string}` | "
|
|
|
338
341
|
/** positive numbers of at least 1e21 print in exponent form and are integers */
|
|
339
342
|
export type LargeIntegerString = `${Digit}${string}e+${string}`;
|
|
340
343
|
export type checkMultipleOf<n> = n extends number ? `${n}` extends NonPositiveString ? never : n : n extends undefined ? n : never;
|
|
344
|
+
export type checkNullable<nullable, type> = [
|
|
345
|
+
nullable
|
|
346
|
+
] extends [anyOrNever] ? nullable : [nullable] extends [false] ? includesNullType<type> extends true ? never : false : nullable extends boolean | undefined ? nullable : never;
|
|
347
|
+
export type includesNullType<type> = [
|
|
348
|
+
type
|
|
349
|
+
] extends [anyOrNever] ? false : JsonSchema.TypeName extends Extract<type, string> ? false : type extends array ? number extends type["length"] ? false : true extends ({
|
|
350
|
+
[i in keyof type]: [type[i]] extends [anyOrNever] ? false : [type[i]] extends ["null"] ? true : false;
|
|
351
|
+
}[number]) ? true : false : [type] extends ["null"] ? true : false;
|
|
341
352
|
export type NonPositiveString = `-${string}` | "0";
|
|
342
353
|
export type checkRef<ref, root> = ref extends LocalRef ? resolveRef<ref, root> extends UnresolvedRef ? {} extends Record<ref, 0> ? string : root extends UnresolvedRef ? string : ref extends PercentEncodedRef ? string : never : string : ref extends "" ? never : ref extends string | undefined ? ref : never;
|
|
343
354
|
export type LocalRef = "#" | `#/${string}`;
|
|
@@ -402,3 +413,4 @@ export type writeInvalidSchemaMessage<actual extends string> = `JSON Schema must
|
|
|
402
413
|
export type writeInvalidCountMessage<keyword extends string, value extends number> = `${keyword} must be a non-negative integer (was ${value})`;
|
|
403
414
|
export type writeInvalidMultipleOfMessage<value extends number> = `multipleOf must be a positive number (was ${value})`;
|
|
404
415
|
export type writeUnsupportedKeywordMessage<keyword extends string> = `${keyword} isn't supported by fromJsonSchema`;
|
|
416
|
+
export type NonNullableNullMessage = "nullable can't be false beside a type that includes null";
|