arktype 2.1.19 → 2.1.21

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.
@@ -106,11 +106,17 @@ const appendSpreadBranch = (base, branch) => {
106
106
  // the only array with no sequence reference is unknown[]
107
107
  return appendVariadicElement(base, $ark.intrinsic.unknown);
108
108
  }
109
- spread.prefix?.forEach(node => appendRequiredElement(base, node));
110
- spread.optionals?.forEach(node => appendOptionalElement(base, node));
109
+ if (spread.prefix)
110
+ for (const node of spread.prefix)
111
+ appendRequiredElement(base, node);
112
+ if (spread.optionals)
113
+ for (const node of spread.optionals)
114
+ appendOptionalElement(base, node);
111
115
  if (spread.variadic)
112
116
  appendVariadicElement(base, spread.variadic);
113
- spread.postfix?.forEach(node => appendRequiredElement(base, node));
117
+ if (spread.postfix)
118
+ for (const node of spread.postfix)
119
+ appendRequiredElement(base, node);
114
120
  return base;
115
121
  };
116
122
  export const writeNonArraySpreadMessage = (operand) => `Spread element must be an array (was ${operand})`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arktype",
3
3
  "description": "TypeScript's 1:1 validator, optimized from editor to runtime",
4
- "version": "2.1.19",
4
+ "version": "2.1.21",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -34,8 +34,8 @@
34
34
  "out"
35
35
  ],
36
36
  "dependencies": {
37
- "@ark/util": "0.45.9",
38
- "@ark/schema": "0.45.9"
37
+ "@ark/util": "0.47.0",
38
+ "@ark/schema": "0.47.0"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"