arktype 2.1.14 → 2.1.16
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/attributes.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ type distillArrayFromPostfix<t extends array, endpoint extends distill.Endpoint,
|
|
|
47
47
|
]> : [...{
|
|
48
48
|
[i in keyof t]: _distill<t[i], endpoint, seen>;
|
|
49
49
|
}, ...postfix];
|
|
50
|
-
type BuiltinTerminalObjectKind = Exclude<
|
|
50
|
+
type BuiltinTerminalObjectKind = Exclude<arkPrototypes.NonDegenerateName, "Array" | "Function">;
|
|
51
51
|
/** Objects we don't want to expand during inference like Date or Promise */
|
|
52
52
|
type TerminallyInferredObject = arkPrototypes.instanceOf<BuiltinTerminalObjectKind> | ArkEnv.prototypes;
|
|
53
53
|
export type inferPredicate<t, predicate> = predicate extends (data: any, ...args: any[]) => data is infer narrowed ? narrowed : t;
|
|
@@ -25,6 +25,7 @@ export declare namespace arkPrototypes {
|
|
|
25
25
|
type platform = PlatformObjects;
|
|
26
26
|
interface instances extends ecmascript, platform {
|
|
27
27
|
}
|
|
28
|
-
type
|
|
28
|
+
type NonDegenerateName = keyof instances extends infer k ? k extends keyof instances ? {} extends instances[k] ? never : k : never : never;
|
|
29
|
+
type instanceOf<name extends NonDegenerateName = NonDegenerateName> = instances[name];
|
|
29
30
|
}
|
|
30
31
|
export {};
|
package/out/keywords/string.js
CHANGED
|
@@ -135,9 +135,9 @@ const epochRoot = stringInteger.root.internal
|
|
|
135
135
|
}
|
|
136
136
|
return true;
|
|
137
137
|
})
|
|
138
|
-
.
|
|
138
|
+
.configure({
|
|
139
139
|
description: "an integer string representing a safe Unix timestamp"
|
|
140
|
-
})
|
|
140
|
+
}, "self")
|
|
141
141
|
.assertHasKind("intersection");
|
|
142
142
|
const epoch = Scope.module({
|
|
143
143
|
root: epochRoot,
|
package/out/match.js
CHANGED
|
@@ -83,9 +83,9 @@ export class InternalChainedMatchParser extends Callable {
|
|
|
83
83
|
return this.$.finalize(cases);
|
|
84
84
|
let inputValidatedCases = this.in.pipe(cases);
|
|
85
85
|
if (defaultCase === "never" || defaultCase === "assert") {
|
|
86
|
-
inputValidatedCases = inputValidatedCases.
|
|
86
|
+
inputValidatedCases = inputValidatedCases.configureReferences({
|
|
87
87
|
onFail: throwOnDefault
|
|
88
|
-
});
|
|
88
|
+
}, "self");
|
|
89
89
|
}
|
|
90
90
|
return this.$.finalize(inputValidatedCases);
|
|
91
91
|
}
|
|
@@ -34,7 +34,7 @@ export const parseNarrowTuple = (def, ctx) => {
|
|
|
34
34
|
}
|
|
35
35
|
return ctx.$.parseOwnDefinitionFormat(def[0], ctx).constrain("predicate", def[2]);
|
|
36
36
|
};
|
|
37
|
-
const parseAttributeTuple = (def, ctx) => ctx.$.parseOwnDefinitionFormat(def[0], ctx).
|
|
37
|
+
const parseAttributeTuple = (def, ctx) => ctx.$.parseOwnDefinitionFormat(def[0], ctx).configureReferences(def[2], "shallow");
|
|
38
38
|
const defineIndexOneParsers = (parsers) => parsers;
|
|
39
39
|
const postfixParsers = defineIndexOneParsers({
|
|
40
40
|
"[]": parseArrayTuple,
|
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.16",
|
|
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.
|
|
38
|
-
"@ark/schema": "0.45.
|
|
37
|
+
"@ark/util": "0.45.6",
|
|
38
|
+
"@ark/schema": "0.45.6"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|