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.
Files changed (46) hide show
  1. package/out/_internal/util/registry.d.ts +1 -1
  2. package/out/{chunk-WNFWNDER.js → chunk-223NAMM2.js} +5 -5
  3. package/out/{chunk-CRZREJ4G.js → chunk-32J3BJIT.js} +2 -2
  4. package/out/{chunk-J7QORHIL.js → chunk-3HYMQFAC.js} +3 -3
  5. package/out/{chunk-EQMTLVCQ.js → chunk-7H7M4BW2.js} +4 -4
  6. package/out/{chunk-U73QHTHA.js → chunk-7NX6KDC7.js} +2 -2
  7. package/out/{chunk-KCMI6RWS.js → chunk-ADCJNPZW.js} +9 -9
  8. package/out/{chunk-KSJQV74J.js → chunk-C6A65WF4.js} +2 -2
  9. package/out/{chunk-26Q54DLB.js → chunk-CE2YGI4T.js} +1 -1
  10. package/out/{chunk-QV545A7L.js → chunk-CM74IBWA.js} +2 -2
  11. package/out/{chunk-2ZLGZFMR.js → chunk-EYXKZRJM.js} +1 -1
  12. package/out/{chunk-SKBFK3NY.js → chunk-FEXLREE4.js} +5 -5
  13. package/out/{chunk-D4LE34UY.js → chunk-IVOJVPSS.js} +1 -1
  14. package/out/{chunk-BGUHS6JL.js → chunk-J6NFH2BS.js} +1 -1
  15. package/out/{chunk-PGCPLG3X.js → chunk-JX4N7RSQ.js} +2 -2
  16. package/out/{chunk-IL34UI7W.js → chunk-LZXHV74B.js} +2 -2
  17. package/out/{chunk-AK2LKC6C.js → chunk-N4DO6WIB.js} +2 -2
  18. package/out/{chunk-45TLVTHM.js → chunk-NQL4QPUE.js} +2 -2
  19. package/out/{chunk-AHXBL3IH.js → chunk-PAP4AM6W.js} +1 -1
  20. package/out/{chunk-5FMUN4UX.js → chunk-SIV4PRW5.js} +3 -3
  21. package/out/{chunk-J7NBKIKH.js → chunk-SLIFVOQJ.js} +1 -1
  22. package/out/{chunk-7WE6VANM.js → chunk-UHXVY3HO.js} +1 -1
  23. package/out/{chunk-DHHFHTCR.js → chunk-UVB5BUJ4.js} +12 -12
  24. package/out/{chunk-2CTZEGD2.js → chunk-UXYJKKHC.js} +1 -1
  25. package/out/{chunk-ADLJDWDI.js → chunk-VNCC4KXJ.js} +1 -1
  26. package/out/codecs.js +11 -11
  27. package/out/config.js +5 -5
  28. package/out/declare.d.ts +24 -5
  29. package/out/errors.js +6 -6
  30. package/out/i18n.js +3 -3
  31. package/out/index.js +11 -11
  32. package/out/internal.js +23 -23
  33. package/out/island.js +12 -12
  34. package/out/islandDependency.js +24 -24
  35. package/out/keywords/ts.js +7 -7
  36. package/out/locales/de.js +4 -4
  37. package/out/locales/en.js +9 -9
  38. package/out/mutatesInput.js +8 -8
  39. package/out/parser/tupleExpressions.d.ts +3 -3
  40. package/out/precompiled.js +6 -6
  41. package/out/runtime.d.ts +1 -1
  42. package/out/runtime.js +1 -1
  43. package/out/schema.js +6 -6
  44. package/out/schemaInternal.js +11 -11
  45. package/out/util.js +1 -1
  46. package/package.json +4 -4
@@ -1,4 +1,4 @@
1
- export declare const arkUtilVersion = "3.0.0-rc.4";
1
+ export declare const arkUtilVersion = "3.0.0-rc.5";
2
2
  export declare const initialRegistryContents: {
3
3
  version: string;
4
4
  FileConstructor: typeof File;
@@ -37,7 +37,7 @@ import {
37
37
  rootKinds,
38
38
  structuralKinds,
39
39
  structureKeys
40
- } from "./chunk-KSJQV74J.js";
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-PGCPLG3X.js";
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-ADLJDWDI.js";
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-D4LE34UY.js";
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-J7NBKIKH.js";
158
+ } from "./chunk-SLIFVOQJ.js";
159
159
  import {
160
160
  Callable,
161
161
  DynamicBase,
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  errorModes
3
- } from "./chunk-AK2LKC6C.js";
3
+ } from "./chunk-N4DO6WIB.js";
4
4
  import {
5
5
  $ark
6
- } from "./chunk-D4LE34UY.js";
6
+ } from "./chunk-IVOJVPSS.js";
7
7
 
8
8
  // ../schema/out/errors.js
9
9
  $ark.errorModes = errorModes;
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  encode,
3
3
  inverses
4
- } from "./chunk-U73QHTHA.js";
4
+ } from "./chunk-7NX6KDC7.js";
5
5
  import {
6
6
  type
7
- } from "./chunk-SKBFK3NY.js";
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-D4LE34UY.js";
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-WNFWNDER.js";
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-KSJQV74J.js";
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-ADLJDWDI.js";
77
+ } from "./chunk-VNCC4KXJ.js";
78
78
  import {
79
79
  $ark,
80
80
  ArkErrors,
81
81
  asTemplated
82
- } from "./chunk-D4LE34UY.js";
82
+ } from "./chunk-IVOJVPSS.js";
83
83
  import {
84
84
  defining,
85
85
  execMorph,
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  referencesWithoutCases,
3
3
  withoutUndefined
4
- } from "./chunk-WNFWNDER.js";
4
+ } from "./chunk-223NAMM2.js";
5
5
  import {
6
6
  $ark
7
- } from "./chunk-D4LE34UY.js";
7
+ } from "./chunk-IVOJVPSS.js";
8
8
  import {
9
9
  assertUnchecked,
10
10
  defining,
@@ -26,22 +26,22 @@ import {
26
26
  encode,
27
27
  inverses,
28
28
  writeMissingInverseMessage
29
- } from "./chunk-U73QHTHA.js";
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-AK2LKC6C.js";
36
+ } from "./chunk-N4DO6WIB.js";
37
37
  import {
38
38
  normalizeLocale
39
- } from "./chunk-2CTZEGD2.js";
39
+ } from "./chunk-UXYJKKHC.js";
40
40
  import {
41
41
  inPlaceTransforms,
42
42
  inputOnlyMorphs,
43
43
  writesInPlace
44
- } from "./chunk-QV545A7L.js";
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-WNFWNDER.js";
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-KSJQV74J.js";
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-PGCPLG3X.js";
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-ADLJDWDI.js";
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-D4LE34UY.js";
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-ADLJDWDI.js";
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-D4LE34UY.js";
21
+ } from "./chunk-IVOJVPSS.js";
22
22
  import {
23
23
  isNode,
24
24
  removedProblemMessage
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configureSchema
3
- } from "./chunk-KSJQV74J.js";
3
+ } from "./chunk-C6A65WF4.js";
4
4
 
5
5
  // out/config.js
6
6
  var configure = configureSchema;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  precompileInPlace
3
- } from "./chunk-WNFWNDER.js";
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-D4LE34UY.js";
9
+ } from "./chunk-IVOJVPSS.js";
10
10
  import {
11
11
  hasArkKind
12
12
  } from "./chunk-GU3X7OIZ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  configure
3
- } from "./chunk-26Q54DLB.js";
3
+ } from "./chunk-CE2YGI4T.js";
4
4
 
5
5
  // out/island.js
6
6
  import { shareConfig } from "arktype/schema/runtime";
@@ -8,13 +8,13 @@ import {
8
8
  tsGenericDefinitions,
9
9
  tsKeywordDefinitions,
10
10
  unknown
11
- } from "./chunk-EQMTLVCQ.js";
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-7WE6VANM.js";
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-WNFWNDER.js";
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-D4LE34UY.js";
62
+ } from "./chunk-IVOJVPSS.js";
63
63
  import {
64
64
  registry
65
- } from "./chunk-J7NBKIKH.js";
65
+ } from "./chunk-SLIFVOQJ.js";
66
66
  import {
67
67
  cached,
68
68
  defineProperties,
@@ -26,7 +26,7 @@ import {
26
26
  nameOf,
27
27
  register,
28
28
  registry
29
- } from "./chunk-J7NBKIKH.js";
29
+ } from "./chunk-SLIFVOQJ.js";
30
30
  import {
31
31
  appendUnique,
32
32
  conflatenateAll,
@@ -5,7 +5,7 @@ import {
5
5
  groupByPath,
6
6
  labelOf,
7
7
  writeKeywordExpected
8
- } from "./chunk-D4LE34UY.js";
8
+ } from "./chunk-IVOJVPSS.js";
9
9
  import {
10
10
  printedActualOf
11
11
  } from "./chunk-GU3X7OIZ.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  CompiledFunction
3
- } from "./chunk-ADLJDWDI.js";
3
+ } from "./chunk-VNCC4KXJ.js";
4
4
  import {
5
5
  ArkTraversal,
6
6
  applyUnread
7
- } from "./chunk-D4LE34UY.js";
7
+ } from "./chunk-IVOJVPSS.js";
8
8
  import {
9
9
  TransformErrors,
10
10
  addMorphErrs,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  inPlaceTransforms,
3
3
  inputOnlyMorphs
4
- } from "./chunk-QV545A7L.js";
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-D4LE34UY.js";
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-PGCPLG3X.js";
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-D4LE34UY.js";
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 precompiledForArktype_3_0_0_rc_4 = true;
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
- precompiledForArktype_3_0_0_rc_4,
1488
+ precompiledForArktype_3_0_0_rc_5,
1489
1489
  assign,
1490
1490
  is,
1491
1491
  freeze,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  en
3
- } from "./chunk-WNFWNDER.js";
3
+ } from "./chunk-223NAMM2.js";
4
4
 
5
5
  // out/locales/en.js
6
6
  var en2 = en;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  type
3
- } from "./chunk-SKBFK3NY.js";
3
+ } from "./chunk-FEXLREE4.js";
4
4
  import {
5
5
  parse
6
- } from "./chunk-EQMTLVCQ.js";
6
+ } from "./chunk-7H7M4BW2.js";
7
7
  import {
8
8
  RootModule
9
- } from "./chunk-WNFWNDER.js";
9
+ } from "./chunk-223NAMM2.js";
10
10
 
11
11
  // out/fromJsonSchema.js
12
12
  var fromJsonSchema = (schema) => (
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-3HZC67MT.js";
5
5
 
6
6
  // ../util/out/registry.js
7
- var arkUtilVersion = "3.0.0-rc.4";
7
+ var arkUtilVersion = "3.0.0-rc.5";
8
8
  var reservedRegistryKeys = {
9
9
  inPlace: void 0,
10
10
  errorModes: void 0,
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-4HREHNIV.js";
4
4
  import {
5
5
  en
6
- } from "./chunk-WNFWNDER.js";
6
+ } from "./chunk-223NAMM2.js";
7
7
 
8
8
  // out/keywords/phrases.js
9
9
  var epoch = "an integer representing a safe Unix timestamp";
@@ -170,7 +170,7 @@ import {
170
170
  pipeTransformed,
171
171
  piped,
172
172
  pipedIntoUndetailed,
173
- precompiledForArktype_3_0_0_rc_4,
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-45TLVTHM.js";
246
- import "./chunk-KCMI6RWS.js";
245
+ } from "./chunk-NQL4QPUE.js";
246
+ import "./chunk-ADCJNPZW.js";
247
247
  import {
248
248
  keywords
249
- } from "./chunk-SKBFK3NY.js";
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-QV545A7L.js";
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-WNFWNDER.js";
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-KSJQV74J.js";
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-PGCPLG3X.js";
317
+ } from "./chunk-JX4N7RSQ.js";
318
318
  import {
319
319
  isDecidedByAllows,
320
320
  isRefinedPattern
321
- } from "./chunk-ADLJDWDI.js";
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-D4LE34UY.js";
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-J7NBKIKH.js";
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
- precompiledForArktype_3_0_0_rc_4: () => precompiledForArktype_3_0_0_rc_4,
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,
@@ -11,7 +11,7 @@ import {
11
11
  writeInvalidLocaleObjectMessage,
12
12
  writeKeywordExpected,
13
13
  writeText
14
- } from "./chunk-D4LE34UY.js";
14
+ } from "./chunk-IVOJVPSS.js";
15
15
  import {
16
16
  describeActual
17
17
  } from "./chunk-GU3X7OIZ.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  registerBuilderCompiler,
3
3
  registeredReference
4
- } from "./chunk-D4LE34UY.js";
4
+ } from "./chunk-IVOJVPSS.js";
5
5
  import {
6
6
  TransformErrors,
7
7
  addMorphErrs,
package/out/codecs.js CHANGED
@@ -1,23 +1,23 @@
1
- export { codec } from "./chunk-J7QORHIL.js";
2
- import "./chunk-U73QHTHA.js";
3
- import "./chunk-SKBFK3NY.js";
4
- import "./chunk-EQMTLVCQ.js";
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-7WE6VANM.js";
7
+ import "./chunk-UHXVY3HO.js";
8
8
  import "./chunk-4HREHNIV.js";
9
- import "./chunk-WNFWNDER.js";
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-KSJQV74J.js";
13
+ import "./chunk-C6A65WF4.js";
14
14
  import "./chunk-W2XOI5DY.js";
15
15
  import "./chunk-TACLEIDM.js";
16
- import "./chunk-PGCPLG3X.js";
17
- import "./chunk-ADLJDWDI.js";
18
- import "./chunk-D4LE34UY.js";
16
+ import "./chunk-JX4N7RSQ.js";
17
+ import "./chunk-VNCC4KXJ.js";
18
+ import "./chunk-IVOJVPSS.js";
19
19
  import "./chunk-GU3X7OIZ.js";
20
- import "./chunk-J7NBKIKH.js";
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-26Q54DLB.js";
2
- import "./chunk-KSJQV74J.js";
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-ADLJDWDI.js";
6
- import "./chunk-D4LE34UY.js";
5
+ import "./chunk-VNCC4KXJ.js";
6
+ import "./chunk-IVOJVPSS.js";
7
7
  import "./chunk-GU3X7OIZ.js";
8
- import "./chunk-J7NBKIKH.js";
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: <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>, $>;
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-CRZREJ4G.js";
2
- export { UndetailedErrors } from "./chunk-AK2LKC6C.js";
3
- import "./chunk-PGCPLG3X.js";
4
- import "./chunk-ADLJDWDI.js";
5
- import "./chunk-D4LE34UY.js";
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-J7NBKIKH.js";
7
+ import "./chunk-SLIFVOQJ.js";
8
8
  import "./chunk-3SH2BQ4T.js";
9
9
  import "./chunk-3HZC67MT.js";
10
10
  import "./chunk-I2KLQ2HA.js";