arktype 3.0.0-rc.4 → 3.0.0-rc.5
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/out/_internal/util/registry.d.ts +1 -1
- package/out/{chunk-WNFWNDER.js → chunk-223NAMM2.js} +5 -5
- package/out/{chunk-CRZREJ4G.js → chunk-32J3BJIT.js} +2 -2
- package/out/{chunk-J7QORHIL.js → chunk-3HYMQFAC.js} +3 -3
- package/out/{chunk-EQMTLVCQ.js → chunk-7H7M4BW2.js} +4 -4
- package/out/{chunk-U73QHTHA.js → chunk-7NX6KDC7.js} +2 -2
- package/out/{chunk-KCMI6RWS.js → chunk-ADCJNPZW.js} +9 -9
- package/out/{chunk-KSJQV74J.js → chunk-C6A65WF4.js} +2 -2
- package/out/{chunk-26Q54DLB.js → chunk-CE2YGI4T.js} +1 -1
- package/out/{chunk-QV545A7L.js → chunk-CM74IBWA.js} +2 -2
- package/out/{chunk-2ZLGZFMR.js → chunk-EYXKZRJM.js} +1 -1
- package/out/{chunk-SKBFK3NY.js → chunk-FEXLREE4.js} +5 -5
- package/out/{chunk-D4LE34UY.js → chunk-IVOJVPSS.js} +1 -1
- package/out/{chunk-BGUHS6JL.js → chunk-J6NFH2BS.js} +1 -1
- package/out/{chunk-PGCPLG3X.js → chunk-JX4N7RSQ.js} +2 -2
- package/out/{chunk-IL34UI7W.js → chunk-LZXHV74B.js} +2 -2
- package/out/{chunk-AK2LKC6C.js → chunk-N4DO6WIB.js} +2 -2
- package/out/{chunk-45TLVTHM.js → chunk-NQL4QPUE.js} +2 -2
- package/out/{chunk-AHXBL3IH.js → chunk-PAP4AM6W.js} +1 -1
- package/out/{chunk-5FMUN4UX.js → chunk-SIV4PRW5.js} +3 -3
- package/out/{chunk-J7NBKIKH.js → chunk-SLIFVOQJ.js} +1 -1
- package/out/{chunk-7WE6VANM.js → chunk-UHXVY3HO.js} +1 -1
- package/out/{chunk-DHHFHTCR.js → chunk-UVB5BUJ4.js} +12 -12
- package/out/{chunk-2CTZEGD2.js → chunk-UXYJKKHC.js} +1 -1
- package/out/{chunk-ADLJDWDI.js → chunk-VNCC4KXJ.js} +1 -1
- package/out/codecs.js +11 -11
- package/out/config.js +5 -5
- package/out/declare.d.ts +24 -5
- package/out/errors.js +6 -6
- package/out/i18n.js +3 -3
- package/out/index.js +11 -11
- package/out/internal.js +23 -23
- package/out/island.js +12 -12
- package/out/islandDependency.js +24 -24
- package/out/keywords/ts.js +7 -7
- package/out/locales/de.js +4 -4
- package/out/locales/en.js +9 -9
- package/out/mutatesInput.js +8 -8
- package/out/parser/tupleExpressions.d.ts +3 -3
- package/out/precompiled.js +6 -6
- package/out/runtime.d.ts +1 -1
- package/out/runtime.js +1 -1
- package/out/schema.js +6 -6
- package/out/schemaInternal.js +11 -11
- package/out/util.js +1 -1
- package/package.json +4 -4
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
rootKinds,
|
|
38
38
|
structuralKinds,
|
|
39
39
|
structureKeys
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-C6A65WF4.js";
|
|
41
41
|
import {
|
|
42
42
|
validateStandardJsonSchemaTarget
|
|
43
43
|
} from "./chunk-W2XOI5DY.js";
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
rootApplyParams,
|
|
50
50
|
rootApplyRuntime,
|
|
51
51
|
writeRootApply
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-JX4N7RSQ.js";
|
|
53
53
|
import {
|
|
54
54
|
CompiledFunction,
|
|
55
55
|
NodeCompiler,
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
isRefinedBasis,
|
|
61
61
|
returnsTransformErrors,
|
|
62
62
|
tryJit
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-VNCC4KXJ.js";
|
|
64
64
|
import {
|
|
65
65
|
$ark,
|
|
66
66
|
ArkErrors,
|
|
@@ -79,7 +79,7 @@ import {
|
|
|
79
79
|
registeredReference,
|
|
80
80
|
registryName,
|
|
81
81
|
siteTraversalOf
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-IVOJVPSS.js";
|
|
83
83
|
import {
|
|
84
84
|
Issues,
|
|
85
85
|
TransformErrors,
|
|
@@ -155,7 +155,7 @@ import {
|
|
|
155
155
|
arkUtilVersion,
|
|
156
156
|
nameOf,
|
|
157
157
|
registeredNameOf
|
|
158
|
-
} from "./chunk-
|
|
158
|
+
} from "./chunk-SLIFVOQJ.js";
|
|
159
159
|
import {
|
|
160
160
|
Callable,
|
|
161
161
|
DynamicBase,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
encode,
|
|
3
3
|
inverses
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7NX6KDC7.js";
|
|
5
5
|
import {
|
|
6
6
|
type
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-FEXLREE4.js";
|
|
8
8
|
import {
|
|
9
9
|
capitalizeString,
|
|
10
10
|
keepFormatted,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
} from "./chunk-4HREHNIV.js";
|
|
27
27
|
import {
|
|
28
28
|
$ark
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-IVOJVPSS.js";
|
|
30
30
|
|
|
31
31
|
// ../schema/out/codecs.js
|
|
32
32
|
$ark.encode = encode;
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
writeForeignArkMessage,
|
|
48
48
|
writeUnboundableMessage,
|
|
49
49
|
writeUnresolvableMessage
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-223NAMM2.js";
|
|
51
51
|
import {
|
|
52
52
|
WeakCache,
|
|
53
53
|
defineLazily
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
rootKinds,
|
|
61
61
|
schemaKindsRightOf,
|
|
62
62
|
unionJsonSchemaWritersKey
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-C6A65WF4.js";
|
|
64
64
|
import {
|
|
65
65
|
openApiNull,
|
|
66
66
|
writeNullableJsonSchema,
|
|
@@ -74,12 +74,12 @@ import {
|
|
|
74
74
|
} from "./chunk-TACLEIDM.js";
|
|
75
75
|
import {
|
|
76
76
|
compileLiteralPropAccess
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-VNCC4KXJ.js";
|
|
78
78
|
import {
|
|
79
79
|
$ark,
|
|
80
80
|
ArkErrors,
|
|
81
81
|
asTemplated
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-IVOJVPSS.js";
|
|
83
83
|
import {
|
|
84
84
|
defining,
|
|
85
85
|
execMorph,
|
|
@@ -26,22 +26,22 @@ import {
|
|
|
26
26
|
encode,
|
|
27
27
|
inverses,
|
|
28
28
|
writeMissingInverseMessage
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-7NX6KDC7.js";
|
|
30
30
|
import {
|
|
31
31
|
ArkFirstIssueTraversal,
|
|
32
32
|
UndetailedErrors,
|
|
33
33
|
UndetailedTraversal,
|
|
34
34
|
errorModes,
|
|
35
35
|
rejectUndetailed
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-N4DO6WIB.js";
|
|
37
37
|
import {
|
|
38
38
|
normalizeLocale
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-UXYJKKHC.js";
|
|
40
40
|
import {
|
|
41
41
|
inPlaceTransforms,
|
|
42
42
|
inputOnlyMorphs,
|
|
43
43
|
writesInPlace
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-CM74IBWA.js";
|
|
45
45
|
import {
|
|
46
46
|
After,
|
|
47
47
|
AfterNode,
|
|
@@ -227,7 +227,7 @@ import {
|
|
|
227
227
|
writeUnsatisfiableExpressionError,
|
|
228
228
|
writeUnsatisfiedParameterConstraintMessage,
|
|
229
229
|
zeroDivisorMessage
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-223NAMM2.js";
|
|
231
231
|
import {
|
|
232
232
|
arrayIndexMatcher,
|
|
233
233
|
arrayIndexSource,
|
|
@@ -266,7 +266,7 @@ import {
|
|
|
266
266
|
writeInvalidLocaleMessage,
|
|
267
267
|
writeInvalidUndeclaredKeyBehaviorMessage,
|
|
268
268
|
writeUnknownConfigOptionMessage
|
|
269
|
-
} from "./chunk-
|
|
269
|
+
} from "./chunk-C6A65WF4.js";
|
|
270
270
|
import {
|
|
271
271
|
ToJsonSchemaError,
|
|
272
272
|
openApiNull,
|
|
@@ -283,7 +283,7 @@ import {
|
|
|
283
283
|
rootApplyParts,
|
|
284
284
|
rootApplyRuntime,
|
|
285
285
|
writeRootApply
|
|
286
|
-
} from "./chunk-
|
|
286
|
+
} from "./chunk-JX4N7RSQ.js";
|
|
287
287
|
import {
|
|
288
288
|
CompiledFunction,
|
|
289
289
|
NodeCompiler,
|
|
@@ -298,7 +298,7 @@ import {
|
|
|
298
298
|
returnsTransformErrors,
|
|
299
299
|
serializeLiteralKey,
|
|
300
300
|
tryJit
|
|
301
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-VNCC4KXJ.js";
|
|
302
302
|
import {
|
|
303
303
|
$ark,
|
|
304
304
|
ArkErrors,
|
|
@@ -351,7 +351,7 @@ import {
|
|
|
351
351
|
writeInvalidLocaleObjectMessage,
|
|
352
352
|
writeKeywordExpected,
|
|
353
353
|
writeText
|
|
354
|
-
} from "./chunk-
|
|
354
|
+
} from "./chunk-IVOJVPSS.js";
|
|
355
355
|
import {
|
|
356
356
|
FirstIssueTraversal,
|
|
357
357
|
FirstIssues,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
} from "./chunk-TACLEIDM.js";
|
|
10
10
|
import {
|
|
11
11
|
compileSerializedValue
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VNCC4KXJ.js";
|
|
13
13
|
import {
|
|
14
14
|
$ark,
|
|
15
15
|
configureAfterTypeMessage,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
errorWritersByCode,
|
|
19
19
|
namedReference,
|
|
20
20
|
registeredReference
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-IVOJVPSS.js";
|
|
22
22
|
import {
|
|
23
23
|
isNode,
|
|
24
24
|
removedProblemMessage
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
precompileInPlace
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-223NAMM2.js";
|
|
4
4
|
import {
|
|
5
5
|
arrayIndexMatcher
|
|
6
6
|
} from "./chunk-CWSF57VM.js";
|
|
7
7
|
import {
|
|
8
8
|
$ark
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IVOJVPSS.js";
|
|
10
10
|
import {
|
|
11
11
|
hasArkKind
|
|
12
12
|
} from "./chunk-GU3X7OIZ.js";
|
|
@@ -8,13 +8,13 @@ import {
|
|
|
8
8
|
tsGenericDefinitions,
|
|
9
9
|
tsKeywordDefinitions,
|
|
10
10
|
unknown
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-7H7M4BW2.js";
|
|
12
12
|
import {
|
|
13
13
|
Hkt
|
|
14
14
|
} from "./chunk-BDJVONP7.js";
|
|
15
15
|
import {
|
|
16
16
|
keywordMeta
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-UHXVY3HO.js";
|
|
18
18
|
import {
|
|
19
19
|
capitalizeString,
|
|
20
20
|
epochDescriptions,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
node,
|
|
48
48
|
rootSchema,
|
|
49
49
|
writeUnresolvableMessage
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-223NAMM2.js";
|
|
51
51
|
import {
|
|
52
52
|
defineLazily
|
|
53
53
|
} from "./chunk-UJJGG4VQ.js";
|
|
@@ -59,10 +59,10 @@ import {
|
|
|
59
59
|
} from "./chunk-US6BWOGJ.js";
|
|
60
60
|
import {
|
|
61
61
|
$ark
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-IVOJVPSS.js";
|
|
63
63
|
import {
|
|
64
64
|
registry
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-SLIFVOQJ.js";
|
|
66
66
|
import {
|
|
67
67
|
cached,
|
|
68
68
|
defineProperties,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
inPlaceTransforms,
|
|
3
3
|
inputOnlyMorphs
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-CM74IBWA.js";
|
|
5
5
|
import {
|
|
6
6
|
parseDate,
|
|
7
7
|
parseInteger,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-4HREHNIV.js";
|
|
12
12
|
import {
|
|
13
13
|
$ark
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-IVOJVPSS.js";
|
|
15
15
|
|
|
16
16
|
// ../schema/out/mutatesInput.js
|
|
17
17
|
$ark.inPlace = inPlaceTransforms;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rootApplyRuntime
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JX4N7RSQ.js";
|
|
4
4
|
import {
|
|
5
5
|
$ark,
|
|
6
6
|
ArkErrors,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
invalidError,
|
|
10
10
|
isArkError,
|
|
11
11
|
serializableErrors
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-IVOJVPSS.js";
|
|
13
13
|
import {
|
|
14
14
|
lineOf
|
|
15
15
|
} from "./chunk-GU3X7OIZ.js";
|
|
@@ -814,7 +814,7 @@ var createRegex = (src, flags) => new RegExp(src, flags);
|
|
|
814
814
|
var regex = /* @__PURE__ */ Object.assign(createRegex, {
|
|
815
815
|
as: createRegex
|
|
816
816
|
});
|
|
817
|
-
var
|
|
817
|
+
var precompiledForArktype_3_0_0_rc_5 = true;
|
|
818
818
|
var assign = /* @__PURE__ */ (() => Object.assign)();
|
|
819
819
|
var is = /* @__PURE__ */ (() => Object.is)();
|
|
820
820
|
var freeze = /* @__PURE__ */ (() => Object.freeze)();
|
|
@@ -1485,7 +1485,7 @@ export {
|
|
|
1485
1485
|
discriminateOr,
|
|
1486
1486
|
union,
|
|
1487
1487
|
regex,
|
|
1488
|
-
|
|
1488
|
+
precompiledForArktype_3_0_0_rc_5,
|
|
1489
1489
|
assign,
|
|
1490
1490
|
is,
|
|
1491
1491
|
freeze,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
type
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FEXLREE4.js";
|
|
4
4
|
import {
|
|
5
5
|
parse
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-7H7M4BW2.js";
|
|
7
7
|
import {
|
|
8
8
|
RootModule
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-223NAMM2.js";
|
|
10
10
|
|
|
11
11
|
// out/fromJsonSchema.js
|
|
12
12
|
var fromJsonSchema = (schema) => (
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
pipeTransformed,
|
|
171
171
|
piped,
|
|
172
172
|
pipedIntoUndetailed,
|
|
173
|
-
|
|
173
|
+
precompiledForArktype_3_0_0_rc_5,
|
|
174
174
|
printKind,
|
|
175
175
|
props,
|
|
176
176
|
raisingTraversalOf,
|
|
@@ -242,17 +242,17 @@ import {
|
|
|
242
242
|
writeUnitMessage,
|
|
243
243
|
writtenBy,
|
|
244
244
|
writtenSiteOf
|
|
245
|
-
} from "./chunk-
|
|
246
|
-
import "./chunk-
|
|
245
|
+
} from "./chunk-NQL4QPUE.js";
|
|
246
|
+
import "./chunk-ADCJNPZW.js";
|
|
247
247
|
import {
|
|
248
248
|
keywords
|
|
249
|
-
} from "./chunk-
|
|
249
|
+
} from "./chunk-FEXLREE4.js";
|
|
250
250
|
import {
|
|
251
251
|
InternalTypedFn
|
|
252
252
|
} from "./chunk-4FTHWK63.js";
|
|
253
253
|
import {
|
|
254
254
|
writesInPlace
|
|
255
|
-
} from "./chunk-
|
|
255
|
+
} from "./chunk-CM74IBWA.js";
|
|
256
256
|
import {
|
|
257
257
|
capitalizeString,
|
|
258
258
|
emptyCollectionDefaults,
|
|
@@ -291,7 +291,7 @@ import {
|
|
|
291
291
|
hashedPrefixLength,
|
|
292
292
|
madeMorphs,
|
|
293
293
|
precompileRootUnits
|
|
294
|
-
} from "./chunk-
|
|
294
|
+
} from "./chunk-223NAMM2.js";
|
|
295
295
|
import {
|
|
296
296
|
isIpv4,
|
|
297
297
|
isIpv6,
|
|
@@ -302,7 +302,7 @@ import {
|
|
|
302
302
|
ToJsonSchema,
|
|
303
303
|
foreignTypesByMorph,
|
|
304
304
|
unionJsonSchemaWritersKey
|
|
305
|
-
} from "./chunk-
|
|
305
|
+
} from "./chunk-C6A65WF4.js";
|
|
306
306
|
import {
|
|
307
307
|
supportedJsonSchemaTargets,
|
|
308
308
|
writeNullableJsonSchema,
|
|
@@ -314,18 +314,18 @@ import {
|
|
|
314
314
|
import {
|
|
315
315
|
rootApplyParts,
|
|
316
316
|
rootApplyRuntime
|
|
317
|
-
} from "./chunk-
|
|
317
|
+
} from "./chunk-JX4N7RSQ.js";
|
|
318
318
|
import {
|
|
319
319
|
isDecidedByAllows,
|
|
320
320
|
isRefinedPattern
|
|
321
|
-
} from "./chunk-
|
|
321
|
+
} from "./chunk-VNCC4KXJ.js";
|
|
322
322
|
import {
|
|
323
323
|
$ark,
|
|
324
324
|
describesData,
|
|
325
325
|
errorWriters,
|
|
326
326
|
errorWritersByCode,
|
|
327
327
|
registryName
|
|
328
|
-
} from "./chunk-
|
|
328
|
+
} from "./chunk-IVOJVPSS.js";
|
|
329
329
|
import {
|
|
330
330
|
describeBranches,
|
|
331
331
|
describeCases,
|
|
@@ -335,7 +335,7 @@ import {
|
|
|
335
335
|
} from "./chunk-GU3X7OIZ.js";
|
|
336
336
|
import {
|
|
337
337
|
nameOf
|
|
338
|
-
} from "./chunk-
|
|
338
|
+
} from "./chunk-SLIFVOQJ.js";
|
|
339
339
|
import {
|
|
340
340
|
ParseError,
|
|
341
341
|
appendStringifiedKey,
|
|
@@ -584,7 +584,7 @@ __export(runtimeExports_exports, {
|
|
|
584
584
|
pipeTransformed: () => pipeTransformed,
|
|
585
585
|
piped: () => piped,
|
|
586
586
|
pipedIntoUndetailed: () => pipedIntoUndetailed,
|
|
587
|
-
|
|
587
|
+
precompiledForArktype_3_0_0_rc_5: () => precompiledForArktype_3_0_0_rc_5,
|
|
588
588
|
printKind: () => printKind,
|
|
589
589
|
printable: () => printable,
|
|
590
590
|
props: () => props,
|
package/out/codecs.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export { codec } from "./chunk-
|
|
2
|
-
import "./chunk-
|
|
3
|
-
import "./chunk-
|
|
4
|
-
import "./chunk-
|
|
1
|
+
export { codec } from "./chunk-3HYMQFAC.js";
|
|
2
|
+
import "./chunk-7NX6KDC7.js";
|
|
3
|
+
import "./chunk-FEXLREE4.js";
|
|
4
|
+
import "./chunk-7H7M4BW2.js";
|
|
5
5
|
import "./chunk-4FTHWK63.js";
|
|
6
6
|
import "./chunk-BDJVONP7.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-UHXVY3HO.js";
|
|
8
8
|
import "./chunk-4HREHNIV.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-223NAMM2.js";
|
|
10
10
|
import "./chunk-CWSF57VM.js";
|
|
11
11
|
import "./chunk-UJJGG4VQ.js";
|
|
12
12
|
import "./chunk-US6BWOGJ.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-C6A65WF4.js";
|
|
14
14
|
import "./chunk-W2XOI5DY.js";
|
|
15
15
|
import "./chunk-TACLEIDM.js";
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-JX4N7RSQ.js";
|
|
17
|
+
import "./chunk-VNCC4KXJ.js";
|
|
18
|
+
import "./chunk-IVOJVPSS.js";
|
|
19
19
|
import "./chunk-GU3X7OIZ.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-SLIFVOQJ.js";
|
|
21
21
|
import "./chunk-3SH2BQ4T.js";
|
|
22
22
|
import "./chunk-3HZC67MT.js";
|
|
23
23
|
import "./chunk-I2KLQ2HA.js";
|
package/out/config.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { configure } from "./chunk-
|
|
2
|
-
import "./chunk-
|
|
1
|
+
export { configure } from "./chunk-CE2YGI4T.js";
|
|
2
|
+
import "./chunk-C6A65WF4.js";
|
|
3
3
|
import "./chunk-W2XOI5DY.js";
|
|
4
4
|
import "./chunk-TACLEIDM.js";
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
import "./chunk-VNCC4KXJ.js";
|
|
6
|
+
import "./chunk-IVOJVPSS.js";
|
|
7
7
|
import "./chunk-GU3X7OIZ.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-SLIFVOQJ.js";
|
|
9
9
|
import "./chunk-3SH2BQ4T.js";
|
|
10
10
|
import "./chunk-3HZC67MT.js";
|
|
11
11
|
import "./chunk-I2KLQ2HA.js";
|
package/out/declare.d.ts
CHANGED
|
@@ -1,16 +1,35 @@
|
|
|
1
|
-
import type { TypeMeta, UndeclaredKeyBehavior } from "./_internal/schema/index.js";
|
|
2
|
-
import type { anyOrNever, array, Backslash, equals, ErrorMessage, ErrorType, optionalKeyOf, requiredKeyOf, show, unset } from "./_internal/util/index.js";
|
|
1
|
+
import type { NodeSelector, TypeMeta, UndeclaredKeyBehavior } from "./_internal/schema/index.js";
|
|
2
|
+
import type { anyOrNever, array, Backslash, conform, Constructor, equals, ErrorMessage, ErrorType, optionalKeyOf, requiredKeyOf, show, unset } from "./_internal/util/index.js";
|
|
3
3
|
import type { distill, Out } from "./attributes.ts";
|
|
4
4
|
import type { type } from "./keywords/keywords.ts";
|
|
5
5
|
import type { inferDefinition, TerminalObjectDefinition, ThunkCast } from "./parser/definition.ts";
|
|
6
6
|
import type { MetaKey } from "./parser/objectLiteral.ts";
|
|
7
7
|
import type { OptionalPropertyDefinition } from "./parser/property.ts";
|
|
8
|
-
import type { TupleExpression } from "./parser/tupleExpressions.ts";
|
|
8
|
+
import type { ArgTwoOperator, IndexZeroOperator, TupleExpression, TupleInfixOperator } from "./parser/tupleExpressions.ts";
|
|
9
9
|
import type { bindThis } from "./scope.ts";
|
|
10
|
-
import type { Type } from "./type.ts";
|
|
10
|
+
import type { Type, ValidatedArgs } from "./type.ts";
|
|
11
11
|
export type DeclarationParser<$> = <preinferred = unset, ctx extends DeclareContext = {}>() => {
|
|
12
|
-
type: <
|
|
12
|
+
type: DeclaredTypeParser<preinferred, $, ctx>;
|
|
13
13
|
};
|
|
14
|
+
type missingDeclarationMessage = `declare<ExternalType>() requires a generic argument`;
|
|
15
|
+
export interface DeclaredTypeParser<preinferred, $, ctx extends DeclareContext> {
|
|
16
|
+
<const def>(def: [preinferred] extends [anyOrNever] ? validateDeclared<preinferred, def, $, ctx> : [preinferred] extends [unset] ? ErrorMessage<missingDeclarationMessage> : validateDeclared<preinferred, def, $, ctx>): Type<finalizePreinferred<preinferred, def, $, ctx>, $>;
|
|
17
|
+
/**
|
|
18
|
+
* A [tuple expression](https://arktype.io/docs/expressions) spread as
|
|
19
|
+
* this function's arguments, e.g. `.type("===", "a", "b")`, checked
|
|
20
|
+
* against the declared type as `.type(["===", "a", "b"])` would be.
|
|
21
|
+
*
|
|
22
|
+
* Each argument is validated as it is by `type`'s own signature for the
|
|
23
|
+
* same form, which a parameter string is not, as `declare` defines a Type
|
|
24
|
+
* rather than a Generic. The declaration is checked on the first argument
|
|
25
|
+
* once the whole expression is valid.
|
|
26
|
+
*/
|
|
27
|
+
<const zero, const one, const rest extends array>(_0: [preinferred] extends [anyOrNever] ? validateDeclaredRoot<preinferred, zero, one, rest, $, ctx> : [preinferred] extends [unset] ? ErrorMessage<missingDeclarationMessage> : validateDeclaredRoot<preinferred, zero, one, rest, $, ctx>, _1: zero extends "keyof" ? type.validate<one, $> : zero extends "instanceof" ? conform<one, Constructor> : zero extends "===" ? conform<one, unknown> : conform<one, ArgTwoOperator>, ..._2: zero extends "===" ? rest : zero extends "instanceof" ? conform<rest, readonly Constructor[]> : one extends TupleInfixOperator ? one extends ":" ? ValidatedArgs<zero, one, rest, $>[zero extends unknown ? "predicateRest" : never] : one extends "=>" ? ValidatedArgs<zero, one, rest, $>[zero extends unknown ? "morphRest" : never] : one extends "@" ? [TypeMeta.MappableInput, NodeSelector?] : ValidatedArgs<zero, one, rest, $>[zero extends unknown ? "operandRest" : never] : []): Type<finalizePreinferred<preinferred, [zero, one, ...rest], $, ctx>, $>;
|
|
28
|
+
}
|
|
29
|
+
type validateDeclaredRoot<preinferred, zero, one, rest extends array, $, ctx extends DeclareContext> = declaredRootMismatch<preinferred, [zero, one, ...rest], $, ctx> extends (infer mismatch) ? [
|
|
30
|
+
mismatch
|
|
31
|
+
] extends [never] ? zero extends IndexZeroOperator ? zero : type.validate<zero, $> : mismatch : never;
|
|
32
|
+
type declaredRootMismatch<preinferred, def extends array, $, ctx extends DeclareContext> = def extends type.validate<def, $> ? validateShallowInference<inferDefinition<def, $>, preinferred, ctx> extends infer result ? unknown extends result ? never : result : never : never;
|
|
14
33
|
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;
|
|
15
34
|
export type DeclareContext = {
|
|
16
35
|
side?: "in" | "out";
|
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-
|
|
1
|
+
import "./chunk-32J3BJIT.js";
|
|
2
|
+
export { UndetailedErrors } from "./chunk-N4DO6WIB.js";
|
|
3
|
+
import "./chunk-JX4N7RSQ.js";
|
|
4
|
+
import "./chunk-VNCC4KXJ.js";
|
|
5
|
+
import "./chunk-IVOJVPSS.js";
|
|
6
6
|
import "./chunk-GU3X7OIZ.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-SLIFVOQJ.js";
|
|
8
8
|
import "./chunk-3SH2BQ4T.js";
|
|
9
9
|
import "./chunk-3HZC67MT.js";
|
|
10
10
|
import "./chunk-I2KLQ2HA.js";
|