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.
- package/README.md +6 -35
- package/out/attributes.d.ts +10 -3
- package/out/keywords/string.d.ts +5 -3
- package/out/keywords/string.js +75 -43
- package/out/methods/base.d.ts +4 -4
- package/out/nary.d.ts +318 -325
- package/out/parser/tupleLiteral.js +9 -3
- package/package.json +3 -3
|
@@ -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
|
|
110
|
-
|
|
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
|
|
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.
|
|
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.
|
|
38
|
-
"@ark/schema": "0.
|
|
37
|
+
"@ark/util": "0.47.0",
|
|
38
|
+
"@ark/schema": "0.47.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|