arktype 2.0.0-rc.27 → 2.0.0-rc.28
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 +5 -5
- package/out/attributes.js +3 -1
- package/package.json +3 -3
package/out/attributes.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ArkError, ArkErrors, Morph } from "@ark/schema";
|
|
2
|
-
import type
|
|
2
|
+
import { type anyOrNever, type array, type Brand, type equals, type Hkt, type intersectArrays, type isSafelyMappable, type Primitive, type show } from "@ark/util";
|
|
3
3
|
import type { arkPrototypes } from "./keywords/constructors.ts";
|
|
4
4
|
import type { type } from "./keywords/keywords.ts";
|
|
5
5
|
import type { Type } from "./type.ts";
|
|
@@ -53,9 +53,9 @@ type TerminallyInferredObject = arkPrototypes.instanceOf<BuiltinTerminalObjectKi
|
|
|
53
53
|
export type inferPredicate<t, predicate> = predicate extends (data: any, ...args: any[]) => data is infer narrowed ? narrowed : t;
|
|
54
54
|
export type inferPipes<t, pipes extends Morph[]> = pipes extends [infer head extends Morph, ...infer tail extends Morph[]] ? inferPipes<head extends type.cast<infer tPipe> ? inferPipe<t, tPipe> : inferMorphOut<head> extends infer out ? (In: distill.In<t>) => Out<out> : never, tail> : t;
|
|
55
55
|
export type inferMorphOut<morph extends Morph> = Exclude<ReturnType<morph>, ArkError | ArkErrors>;
|
|
56
|
-
declare const
|
|
56
|
+
declare const isMorphOutKey: " isMorphOut";
|
|
57
57
|
export interface Out<o = any> {
|
|
58
|
-
[
|
|
58
|
+
[isMorphOutKey]: true;
|
|
59
59
|
t: o;
|
|
60
60
|
introspectable: boolean;
|
|
61
61
|
}
|
|
@@ -63,9 +63,9 @@ export interface To<o = any> extends Out<o> {
|
|
|
63
63
|
introspectable: true;
|
|
64
64
|
}
|
|
65
65
|
export type InferredMorph<i = any, o extends Out = Out> = (In: i) => o;
|
|
66
|
-
declare const
|
|
66
|
+
declare const defaultsToKey: " defaultsTo";
|
|
67
67
|
export type Default<t = unknown, v = unknown> = {
|
|
68
|
-
[
|
|
68
|
+
[defaultsToKey]: [t, v];
|
|
69
69
|
};
|
|
70
70
|
export type withDefault<t, v, undistributed = t> = t extends InferredMorph ? addDefaultToMorph<t, v> : Default<Exclude<undistributed, InferredMorph>, v>;
|
|
71
71
|
type addDefaultToMorph<t extends InferredMorph, v> = [
|
package/out/attributes.js
CHANGED
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.0.0-rc.
|
|
4
|
+
"version": "2.0.0-rc.28",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "David Blass",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"out"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@ark/util": "0.
|
|
38
|
-
"@ark/schema": "0.
|
|
37
|
+
"@ark/util": "0.28.0",
|
|
38
|
+
"@ark/schema": "0.28.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|