bupkis 0.2.0 → 0.3.0
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/CHANGELOG.md +15 -0
- package/README.md +9 -9
- package/dist/commonjs/assertion/assertion-async.d.ts +2 -1
- package/dist/commonjs/assertion/assertion-async.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion-async.js +84 -2
- package/dist/commonjs/assertion/assertion-async.js.map +1 -1
- package/dist/commonjs/assertion/assertion-sync.d.ts +1 -1
- package/dist/commonjs/assertion/assertion-sync.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion-sync.js +5 -1
- package/dist/commonjs/assertion/assertion-sync.js.map +1 -1
- package/dist/commonjs/assertion/assertion-types.d.ts +6 -2
- package/dist/commonjs/assertion/assertion-types.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion.d.ts +1 -1
- package/dist/commonjs/assertion/assertion.d.ts.map +1 -1
- package/dist/commonjs/assertion/assertion.js +1 -14
- package/dist/commonjs/assertion/assertion.js.map +1 -1
- package/dist/commonjs/assertion/impl/async.d.ts +122 -21
- package/dist/commonjs/assertion/impl/async.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/async.js +112 -88
- package/dist/commonjs/assertion/impl/async.js.map +1 -1
- package/dist/commonjs/assertion/impl/callback.d.ts +104 -0
- package/dist/commonjs/assertion/impl/callback.d.ts.map +1 -0
- package/dist/commonjs/assertion/impl/callback.js +694 -0
- package/dist/commonjs/assertion/impl/callback.js.map +1 -0
- package/dist/commonjs/assertion/impl/index.d.ts +1 -1
- package/dist/commonjs/assertion/impl/index.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/index.js.map +1 -1
- package/dist/commonjs/assertion/impl/sync-esoteric.js +1 -1
- package/dist/commonjs/assertion/impl/sync-esoteric.js.map +1 -1
- package/dist/commonjs/assertion/impl/sync-parametric.d.ts +21 -18
- package/dist/commonjs/assertion/impl/sync-parametric.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/sync-parametric.js +31 -46
- package/dist/commonjs/assertion/impl/sync-parametric.js.map +1 -1
- package/dist/commonjs/assertion/impl/sync.d.ts +66 -19
- package/dist/commonjs/assertion/impl/sync.d.ts.map +1 -1
- package/dist/commonjs/assertion/impl/sync.js +4 -1
- package/dist/commonjs/assertion/impl/sync.js.map +1 -1
- package/dist/commonjs/bootstrap.d.ts +145 -41
- package/dist/commonjs/bootstrap.d.ts.map +1 -1
- package/dist/commonjs/bootstrap.js +2 -3
- package/dist/commonjs/bootstrap.js.map +1 -1
- package/dist/commonjs/constant.js +7 -1
- package/dist/commonjs/constant.js.map +1 -1
- package/dist/commonjs/error.d.ts +22 -2
- package/dist/commonjs/error.d.ts.map +1 -1
- package/dist/commonjs/error.js +44 -4
- package/dist/commonjs/error.js.map +1 -1
- package/dist/commonjs/expect.d.ts.map +1 -1
- package/dist/commonjs/expect.js +1 -1
- package/dist/commonjs/expect.js.map +1 -1
- package/dist/commonjs/guards.d.ts +23 -5
- package/dist/commonjs/guards.d.ts.map +1 -1
- package/dist/commonjs/guards.js +26 -24
- package/dist/commonjs/guards.js.map +1 -1
- package/dist/commonjs/index.d.ts +144 -40
- package/dist/commonjs/index.d.ts.map +1 -1
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/schema.d.ts +18 -8
- package/dist/commonjs/schema.d.ts.map +1 -1
- package/dist/commonjs/schema.js +21 -11
- package/dist/commonjs/schema.js.map +1 -1
- package/dist/commonjs/types.d.ts +39 -8
- package/dist/commonjs/types.d.ts.map +1 -1
- package/dist/commonjs/util.d.ts +66 -50
- package/dist/commonjs/util.d.ts.map +1 -1
- package/dist/commonjs/util.js +169 -156
- package/dist/commonjs/util.js.map +1 -1
- package/dist/commonjs/value-to-schema.d.ts +122 -0
- package/dist/commonjs/value-to-schema.d.ts.map +1 -0
- package/dist/commonjs/value-to-schema.js +309 -0
- package/dist/commonjs/value-to-schema.js.map +1 -0
- package/dist/esm/assertion/assertion-async.d.ts +2 -1
- package/dist/esm/assertion/assertion-async.d.ts.map +1 -1
- package/dist/esm/assertion/assertion-async.js +85 -3
- package/dist/esm/assertion/assertion-async.js.map +1 -1
- package/dist/esm/assertion/assertion-sync.d.ts +1 -1
- package/dist/esm/assertion/assertion-sync.d.ts.map +1 -1
- package/dist/esm/assertion/assertion-sync.js +6 -2
- package/dist/esm/assertion/assertion-sync.js.map +1 -1
- package/dist/esm/assertion/assertion-types.d.ts +6 -2
- package/dist/esm/assertion/assertion-types.d.ts.map +1 -1
- package/dist/esm/assertion/assertion.d.ts +1 -1
- package/dist/esm/assertion/assertion.d.ts.map +1 -1
- package/dist/esm/assertion/assertion.js +1 -14
- package/dist/esm/assertion/assertion.js.map +1 -1
- package/dist/esm/assertion/impl/async.d.ts +122 -21
- package/dist/esm/assertion/impl/async.d.ts.map +1 -1
- package/dist/esm/assertion/impl/async.js +111 -87
- package/dist/esm/assertion/impl/async.js.map +1 -1
- package/dist/esm/assertion/impl/callback.d.ts +104 -0
- package/dist/esm/assertion/impl/callback.d.ts.map +1 -0
- package/dist/esm/assertion/impl/callback.js +691 -0
- package/dist/esm/assertion/impl/callback.js.map +1 -0
- package/dist/esm/assertion/impl/index.d.ts +1 -1
- package/dist/esm/assertion/impl/index.d.ts.map +1 -1
- package/dist/esm/assertion/impl/index.js +1 -1
- package/dist/esm/assertion/impl/index.js.map +1 -1
- package/dist/esm/assertion/impl/sync-esoteric.js +2 -2
- package/dist/esm/assertion/impl/sync-esoteric.js.map +1 -1
- package/dist/esm/assertion/impl/sync-parametric.d.ts +21 -18
- package/dist/esm/assertion/impl/sync-parametric.d.ts.map +1 -1
- package/dist/esm/assertion/impl/sync-parametric.js +31 -46
- package/dist/esm/assertion/impl/sync-parametric.js.map +1 -1
- package/dist/esm/assertion/impl/sync.d.ts +66 -19
- package/dist/esm/assertion/impl/sync.d.ts.map +1 -1
- package/dist/esm/assertion/impl/sync.js +3 -1
- package/dist/esm/assertion/impl/sync.js.map +1 -1
- package/dist/esm/bootstrap.d.ts +145 -41
- package/dist/esm/bootstrap.d.ts.map +1 -1
- package/dist/esm/bootstrap.js +1 -2
- package/dist/esm/bootstrap.js.map +1 -1
- package/dist/esm/constant.js +6 -0
- package/dist/esm/constant.js.map +1 -1
- package/dist/esm/error.d.ts +22 -2
- package/dist/esm/error.d.ts.map +1 -1
- package/dist/esm/error.js +43 -4
- package/dist/esm/error.js.map +1 -1
- package/dist/esm/expect.d.ts.map +1 -1
- package/dist/esm/expect.js +2 -2
- package/dist/esm/expect.js.map +1 -1
- package/dist/esm/guards.d.ts +23 -5
- package/dist/esm/guards.d.ts.map +1 -1
- package/dist/esm/guards.js +22 -21
- package/dist/esm/guards.js.map +1 -1
- package/dist/esm/index.d.ts +144 -40
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/schema.d.ts +18 -8
- package/dist/esm/schema.d.ts.map +1 -1
- package/dist/esm/schema.js +21 -11
- package/dist/esm/schema.js.map +1 -1
- package/dist/esm/types.d.ts +39 -8
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/util.d.ts +66 -50
- package/dist/esm/util.d.ts.map +1 -1
- package/dist/esm/util.js +153 -154
- package/dist/esm/util.js.map +1 -1
- package/dist/esm/value-to-schema.d.ts +122 -0
- package/dist/esm/value-to-schema.d.ts.map +1 -0
- package/dist/esm/value-to-schema.js +305 -0
- package/dist/esm/value-to-schema.js.map +1 -0
- package/package.json +16 -13
- package/src/assertion/assertion-async.ts +113 -3
- package/src/assertion/assertion-sync.ts +5 -2
- package/src/assertion/assertion-types.ts +14 -4
- package/src/assertion/assertion.ts +2 -17
- package/src/assertion/impl/async.ts +130 -90
- package/src/assertion/impl/callback.ts +882 -0
- package/src/assertion/impl/index.ts +1 -1
- package/src/assertion/impl/sync-esoteric.ts +2 -2
- package/src/assertion/impl/sync-parametric.ts +40 -48
- package/src/assertion/impl/sync.ts +3 -0
- package/src/bootstrap.ts +1 -2
- package/src/constant.ts +8 -0
- package/src/error.ts +57 -3
- package/src/expect.ts +6 -2
- package/src/guards.ts +45 -18
- package/src/index.ts +1 -0
- package/src/schema.ts +22 -11
- package/src/types.ts +40 -8
- package/src/util.ts +168 -223
- package/src/value-to-schema.ts +464 -0
package/dist/esm/guards.d.ts
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { type Primitive } from 'type-fest';
|
|
19
19
|
import { z } from 'zod/v4';
|
|
20
|
-
import type { Constructor } from './types.js';
|
|
20
|
+
import type { Constructor, ZodTypeMap } from './types.js';
|
|
21
21
|
/**
|
|
22
22
|
* Returns `true` if the given value looks like a Zod v4 schema, determined by
|
|
23
23
|
* the presence of an internal {@link z.core.$ZodTypeDef} field.
|
|
@@ -25,13 +25,31 @@ import type { Constructor } from './types.js';
|
|
|
25
25
|
* Note: This relies on Zod's internal shape and is intended for runtime
|
|
26
26
|
* discrimination within this library.
|
|
27
27
|
*
|
|
28
|
-
* @template T
|
|
28
|
+
* @template T - The specific ZodType to check for (based on def.type)
|
|
29
29
|
* @param value - Value to test
|
|
30
30
|
* @returns Whether the value is `ZodType`-like
|
|
31
31
|
*/
|
|
32
|
-
export declare
|
|
32
|
+
export declare function isZodType<T extends keyof ZodTypeMap>(value: unknown, type: T): value is ZodTypeMap[T];
|
|
33
33
|
/**
|
|
34
|
-
* Returns true if the given value
|
|
34
|
+
* Returns `true` if the given value looks like a Zod v4 schema, determined by
|
|
35
|
+
* the presence of an internal {@link z.core.$ZodTypeDef} field.
|
|
36
|
+
*
|
|
37
|
+
* Note: This relies on Zod's internal shape and is intended for runtime
|
|
38
|
+
* discrimination within this library.
|
|
39
|
+
*
|
|
40
|
+
* @param value - Value to test
|
|
41
|
+
* @returns Whether the value is `ZodType`-like
|
|
42
|
+
*/
|
|
43
|
+
export declare function isZodType(value: unknown): value is z.ZodType;
|
|
44
|
+
/**
|
|
45
|
+
* Type guard for a plain object.
|
|
46
|
+
*
|
|
47
|
+
* @param value Value to test
|
|
48
|
+
* @returns `true` if the value is a plain object, `false` otherwise
|
|
49
|
+
*/
|
|
50
|
+
export declare const isObject: (value: unknown) => value is NonNullable<object>;
|
|
51
|
+
/**
|
|
52
|
+
* Returns `true` if the given value is a {@link z.ZodPromise} schema.
|
|
35
53
|
*
|
|
36
54
|
* @param value - Value to test
|
|
37
55
|
* @returns `true` if the value is a `ZodPromise` schema; `false` otherwise
|
|
@@ -59,7 +77,7 @@ export declare const isPromiseLike: (value: unknown) => value is PromiseLike<unk
|
|
|
59
77
|
* @param fn - Function to test
|
|
60
78
|
* @returns Whether the function is constructable
|
|
61
79
|
*/
|
|
62
|
-
export declare const
|
|
80
|
+
export declare const isConstructible: (fn: unknown) => fn is Constructor;
|
|
63
81
|
/**
|
|
64
82
|
* Type guard for a boolean value
|
|
65
83
|
*
|
package/dist/esm/guards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../src/guards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAO3B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"guards.d.ts","sourceRoot":"","sources":["../../src/guards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAO3B,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE1D;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,UAAU,EAClD,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,CAAC,GACN,KAAK,IAAI,U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,KAAG,KAAK,IAAI,KAA0B,CAAC"}
|
package/dist/esm/guards.js
CHANGED
|
@@ -16,40 +16,41 @@
|
|
|
16
16
|
* @packageDocumentation
|
|
17
17
|
*/
|
|
18
18
|
import { z } from 'zod/v4';
|
|
19
|
+
export function isZodType(value, type) {
|
|
20
|
+
const isValid = isObject(value) &&
|
|
21
|
+
'def' in value &&
|
|
22
|
+
!!value.def &&
|
|
23
|
+
typeof value.def === 'object' &&
|
|
24
|
+
'type' in value.def;
|
|
25
|
+
if (!isValid)
|
|
26
|
+
return false;
|
|
27
|
+
if (type === undefined)
|
|
28
|
+
return true;
|
|
29
|
+
return value.def.type === type;
|
|
30
|
+
}
|
|
19
31
|
/**
|
|
20
|
-
*
|
|
21
|
-
* the presence of an internal {@link z.core.$ZodTypeDef} field.
|
|
22
|
-
*
|
|
23
|
-
* Note: This relies on Zod's internal shape and is intended for runtime
|
|
24
|
-
* discrimination within this library.
|
|
32
|
+
* Type guard for a plain object.
|
|
25
33
|
*
|
|
26
|
-
* @
|
|
27
|
-
* @
|
|
28
|
-
* @returns Whether the value is `ZodType`-like
|
|
34
|
+
* @param value Value to test
|
|
35
|
+
* @returns `true` if the value is a plain object, `false` otherwise
|
|
29
36
|
*/
|
|
30
|
-
export const
|
|
31
|
-
typeof value === 'object' &&
|
|
32
|
-
|
|
33
|
-
value.def &&
|
|
34
|
-
typeof value.def === 'object' &&
|
|
35
|
-
'type' in value.def);
|
|
37
|
+
export const isObject = (value) => {
|
|
38
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
39
|
+
};
|
|
36
40
|
/**
|
|
37
|
-
* Returns true if the given value is a {@link z.ZodPromise} schema.
|
|
41
|
+
* Returns `true` if the given value is a {@link z.ZodPromise} schema.
|
|
38
42
|
*
|
|
39
43
|
* @param value - Value to test
|
|
40
44
|
* @returns `true` if the value is a `ZodPromise` schema; `false` otherwise
|
|
41
45
|
*/
|
|
42
|
-
export const isZodPromise = (value) => isZodType(value
|
|
46
|
+
export const isZodPromise = (value) => isZodType(value, 'promise');
|
|
43
47
|
/**
|
|
44
48
|
* Checks if a value is "promise-like", meaning it is a "thenable" object.
|
|
45
49
|
*
|
|
46
50
|
* @param value - Value to test
|
|
47
51
|
* @returns `true` if the value is promise-like, `false` otherwise
|
|
48
52
|
*/
|
|
49
|
-
export const isPromiseLike = (value) =>
|
|
50
|
-
typeof value === 'object' &&
|
|
51
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
52
|
-
typeof value.then === 'function');
|
|
53
|
+
export const isPromiseLike = (value) => isObject(value) && 'then' in value && isFunction(value.then);
|
|
53
54
|
/**
|
|
54
55
|
* Returns `true` if the given value is a constructable function (i.e., a
|
|
55
56
|
* class).
|
|
@@ -65,7 +66,7 @@ export const isPromiseLike = (value) => !!(value &&
|
|
|
65
66
|
* @param fn - Function to test
|
|
66
67
|
* @returns Whether the function is constructable
|
|
67
68
|
*/
|
|
68
|
-
export const
|
|
69
|
+
export const isConstructible = (fn) => {
|
|
69
70
|
if (fn === Symbol || fn === BigInt) {
|
|
70
71
|
return false;
|
|
71
72
|
}
|
package/dist/esm/guards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/guards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"guards.js","sourceRoot":"","sources":["../../src/guards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAmC3B,MAAM,UAAU,SAAS,CACvB,KAAc,EACd,IAAQ;IAER,MAAM,OAAO,GACX,QAAQ,CAAC,KAAK,CAAC;QACf,KAAK,IAAI,KAAK;QACd,CAAC,CAAC,KAAK,CAAC,GAAG;QACX,OAAO,KAAK,CAAC,GAAG,KAAK,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,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AAEvD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAoB,EAAmB,EAAE,CACvE,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAE/C,MAAM,CAAC,MAAM,GAAG,GAAG,CACjB,KAAc,EACd,IAAO,EACmB,EAAE;IAC5B,OAAO,eAAe,CAAC,KAAK,CAAC,IAAI,KAAK,YAAY,IAAI,CAAC;AACzD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAc,EAAkB,EAAE,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export { z };
|
|
|
37
37
|
/**
|
|
38
38
|
* @primaryExport
|
|
39
39
|
*/
|
|
40
|
-
export type { Bupkis, CreateAssertionFn, CreateAsyncAssertionFn, Expect, ExpectAsync, FailFn, UseFn, } from './types.js';
|
|
40
|
+
export type { Bupkis, CreateAssertionFn, CreateAsyncAssertionFn, Expect, ExpectAsync, FailFn, UseFn, ZodTypeMap, } from './types.js';
|
|
41
41
|
export { createAssertion, createAsyncAssertion, fail, use };
|
|
42
42
|
declare const
|
|
43
43
|
/**
|
|
@@ -141,15 +141,21 @@ use: import("./types.js").UseFn<readonly [import("./types.js").AssertionFunction
|
|
|
141
141
|
actual: unknown;
|
|
142
142
|
expected: unknown;
|
|
143
143
|
message: string;
|
|
144
|
-
} | undefined, readonly [z.ZodUnknown, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to be", "to equal", "equals", "is", "is equal to", "to strictly equal"]>, z.ZodUnknown]>, import("./types.js").
|
|
145
|
-
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
}, z.core.$loose
|
|
144
|
+
} | undefined, readonly [z.ZodUnknown, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to be", "to equal", "equals", "is", "is equal to", "to strictly equal"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodObject<{}, z.core.$loose>, readonly ["to deep equal", "to deeply equal"], z.ZodObject<{}, z.core.$loose>], (_: {
|
|
145
|
+
[x: string]: unknown;
|
|
146
|
+
}, expected: {
|
|
147
|
+
[x: string]: unknown;
|
|
148
|
+
}) => z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>, readonly [z.ZodObject<{}, z.core.$loose>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to deep equal", "to deeply equal"]>, z.ZodObject<{}, z.core.$loose>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
|
|
149
149
|
length: z.ZodNumber;
|
|
150
150
|
}, z.core.$loose>]>, readonly ["to deep equal", "to deeply equal"], z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
|
|
151
151
|
length: z.ZodNumber;
|
|
152
|
-
}, z.core.$loose>]>]
|
|
152
|
+
}, z.core.$loose>]>], (_: unknown[] | [unknown, ...unknown[]] | {
|
|
153
|
+
[x: string]: unknown;
|
|
154
|
+
length: number;
|
|
155
|
+
}, expected: unknown[] | [unknown, ...unknown[]] | {
|
|
156
|
+
[x: string]: unknown;
|
|
157
|
+
length: number;
|
|
158
|
+
}) => z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>, readonly [z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
|
|
153
159
|
length: z.ZodNumber;
|
|
154
160
|
}, z.core.$loose>]>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to deep equal", "to deeply equal"]>, z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
|
|
155
161
|
length: z.ZodNumber;
|
|
@@ -164,31 +170,29 @@ use: import("./types.js").UseFn<readonly [import("./types.js").AssertionFunction
|
|
|
164
170
|
[x: string]: unknown;
|
|
165
171
|
}) => boolean, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to throw"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to throw a", "to thrown an"], z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>, "satisfying", z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, ctor: import("./types.js").Constructor, param: string | RegExp | {
|
|
166
172
|
[x: string]: unknown;
|
|
167
|
-
}) => {
|
|
168
|
-
actual:
|
|
173
|
+
}) => z.ZodError<unknown> | {
|
|
174
|
+
actual: never;
|
|
169
175
|
expected: string;
|
|
170
176
|
message: string;
|
|
171
|
-
} | {
|
|
172
|
-
actual:
|
|
173
|
-
expected:
|
|
174
|
-
[x: string]: unknown;
|
|
175
|
-
};
|
|
177
|
+
} | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to throw a", "to thrown an"]>, z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>, import("./types.js").PhraseLiteralSlot<"satisfying">, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodString, readonly ["includes", "contains", "to include", "to contain"], z.ZodString], (subject: string, expected: string) => {
|
|
178
|
+
actual: string;
|
|
179
|
+
expected: string;
|
|
176
180
|
message: string;
|
|
177
|
-
} | undefined, readonly [z.
|
|
181
|
+
} | undefined, readonly [z.ZodString, import("./types.js").PhraseLiteralChoiceSlot<readonly ["includes", "contains", "to include", "to contain"]>, z.ZodString]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodString, "to match", z.ZodCustom<RegExp, RegExp>], (subject: string, regex: RegExp) => boolean, readonly [z.ZodString, import("./types.js").PhraseLiteralSlot<"to match">, z.ZodCustom<RegExp, RegExp>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodNonOptional<z.ZodObject<{}, z.core.$loose>>, readonly ["to satisfy", "to be like"], z.ZodObject<{}, z.core.$loose>], (_subject: {
|
|
178
182
|
[x: string]: unknown;
|
|
179
183
|
}, shape: {
|
|
180
184
|
[x: string]: unknown;
|
|
181
|
-
}) => z.ZodType<
|
|
185
|
+
}) => z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>, readonly [z.ZodNonOptional<z.ZodObject<{}, z.core.$loose>>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to satisfy", "to be like"]>, z.ZodObject<{}, z.core.$loose>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
|
|
182
186
|
length: z.ZodNumber;
|
|
183
187
|
}, z.core.$loose>]>, readonly ["to satisfy", "to be like"], z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
|
|
184
188
|
length: z.ZodNumber;
|
|
185
|
-
}, z.core.$loose>]>], (
|
|
189
|
+
}, z.core.$loose>]>], (_subject: unknown[] | [unknown, ...unknown[]] | {
|
|
186
190
|
[x: string]: unknown;
|
|
187
191
|
length: number;
|
|
188
192
|
}, shape: unknown[] | [unknown, ...unknown[]] | {
|
|
189
193
|
[x: string]: unknown;
|
|
190
194
|
length: number;
|
|
191
|
-
}) =>
|
|
195
|
+
}) => z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>, readonly [z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
|
|
192
196
|
length: z.ZodNumber;
|
|
193
197
|
}, z.core.$loose>]>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to satisfy", "to be like"]>, z.ZodUnion<readonly [z.ZodArray<z.ZodUnknown>, z.ZodTuple<[z.ZodUnknown], z.ZodUnknown>, z.ZodObject<{
|
|
194
198
|
length: z.ZodNumber;
|
|
@@ -196,37 +200,137 @@ use: import("./types.js").UseFn<readonly [import("./types.js").AssertionFunction
|
|
|
196
200
|
actual: number;
|
|
197
201
|
expected: number;
|
|
198
202
|
message: string;
|
|
199
|
-
} | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralSlot<"to have arity">, z.ZodNumber]
|
|
203
|
+
} | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralSlot<"to have arity">, z.ZodNumber]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call callback", "to invoke callback"]], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown) => boolean, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call callback", "to invoke callback"]>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call nodeback", "to invoke nodeback"]], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown) => boolean, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call nodeback", "to invoke nodeback"]>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call callback with", "to invoke callback with"], z.ZodUnknown], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: unknown) => {
|
|
204
|
+
actual: string;
|
|
205
|
+
expected: string;
|
|
206
|
+
message: string;
|
|
207
|
+
} | z.ZodError<any> | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call callback with", "to invoke callback with"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call callback with exactly", "to call callback with exact value", "to invoke callback with exactly", "to invoke callback with exact value"], z.ZodUnknown], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, expected: unknown) => {
|
|
208
|
+
actual: unknown;
|
|
209
|
+
expected: unknown;
|
|
210
|
+
message: string;
|
|
211
|
+
} | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call callback with exactly", "to call callback with exact value", "to invoke callback with exactly", "to invoke callback with exact value"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call nodeback with", "to invoke nodeback with"], z.ZodUnknown], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: unknown) => {
|
|
212
|
+
actual: string;
|
|
213
|
+
expected: string;
|
|
214
|
+
message: string;
|
|
215
|
+
} | z.ZodError<any> | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call nodeback with", "to invoke nodeback with"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call nodeback with exactly", "to call nodeback with exact value", "to invoke nodeback with exactly", "to invoke nodeback with exact value"], z.ZodUnknown], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, expected: unknown) => {
|
|
216
|
+
actual: unknown;
|
|
217
|
+
expected: unknown;
|
|
218
|
+
message: string;
|
|
219
|
+
} | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call nodeback with exactly", "to call nodeback with exact value", "to invoke nodeback with exactly", "to invoke nodeback with exact value"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call nodeback with error", "to invoke nodeback with error"]], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown) => {
|
|
220
|
+
actual: string;
|
|
221
|
+
expected: string;
|
|
222
|
+
message: string;
|
|
223
|
+
} | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call nodeback with error", "to invoke nodeback with error"]>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call nodeback with a", "to call nodeback with an", "to invoke nodeback with a", "to invoke nodeback with an"], z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, ctor: import("./types.js").Constructor) => {
|
|
224
|
+
actual: string;
|
|
225
|
+
expected: string;
|
|
226
|
+
message: string;
|
|
227
|
+
} | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call nodeback with a", "to call nodeback with an", "to invoke nodeback with a", "to invoke nodeback with an"]>, z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call nodeback with error", "to invoke nodeback with error"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
200
228
|
[x: string]: unknown;
|
|
201
|
-
}) =>
|
|
229
|
+
}) => z.ZodError<unknown> | {
|
|
230
|
+
actual: string;
|
|
231
|
+
expected: string;
|
|
232
|
+
message: string;
|
|
233
|
+
} | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call nodeback with error", "to invoke nodeback with error"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call callback with value satisfying", "to invoke callback with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
202
234
|
[x: string]: unknown;
|
|
203
|
-
}) =>
|
|
235
|
+
}) => {
|
|
236
|
+
actual: string;
|
|
237
|
+
expected: string;
|
|
238
|
+
message: string;
|
|
239
|
+
} | z.ZodError<any> | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call callback with value satisfying", "to invoke callback with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionSync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to call nodeback with value satisfying", "to invoke nodeback with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
204
240
|
[x: string]: unknown;
|
|
205
|
-
}) =>
|
|
206
|
-
actual:
|
|
241
|
+
}) => {
|
|
242
|
+
actual: string;
|
|
243
|
+
expected: string;
|
|
244
|
+
message: string;
|
|
245
|
+
} | z.ZodError<any> | undefined, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to call nodeback with value satisfying", "to invoke nodeback with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>], readonly [import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to resolve", "to fulfill"]], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
246
|
+
actual: string;
|
|
247
|
+
expected: string;
|
|
248
|
+
message: string;
|
|
249
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to resolve", "to fulfill"]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to resolve", "to fulfill"]], (subject: PromiseLike<unknown>) => Promise<{
|
|
250
|
+
actual: string;
|
|
251
|
+
expected: string;
|
|
252
|
+
message: string;
|
|
253
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to resolve", "to fulfill"]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, "to reject"], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
254
|
+
actual: string;
|
|
255
|
+
expected: string;
|
|
256
|
+
message: string;
|
|
257
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralSlot<"to reject">]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, "to reject"], (subject: PromiseLike<unknown>) => Promise<{
|
|
258
|
+
actual: string;
|
|
259
|
+
expected: string;
|
|
260
|
+
message: string;
|
|
261
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("./types.js").PhraseLiteralSlot<"to reject">]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with a", "to reject with an"], z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, ctor: import("./types.js").Constructor) => Promise<boolean>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to reject with a", "to reject with an"]>, z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with a", "to reject with an"], z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>], (subject: PromiseLike<unknown>, ctor: import("./types.js").Constructor) => Promise<boolean>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to reject with a", "to reject with an"]>, z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to reject with error satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
262
|
+
[x: string]: unknown;
|
|
263
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
264
|
+
actual: string;
|
|
207
265
|
expect: string;
|
|
208
266
|
message: string;
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
};
|
|
267
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to reject with error satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to reject with error satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: PromiseLike<unknown>, param: string | RegExp | {
|
|
268
|
+
[x: string]: unknown;
|
|
269
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
270
|
+
actual: string;
|
|
271
|
+
expect: string;
|
|
215
272
|
message: string;
|
|
216
|
-
|
|
217
|
-
}>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to fulfill with value satisfying", "to resolve with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
273
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to reject with error satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, readonly ["to fulfill with value satisfying", "to resolve with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (promise: PromiseLike<unknown>, param: string | RegExp | {
|
|
218
274
|
[x: string]: unknown;
|
|
219
|
-
}) => Promise<
|
|
275
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
220
276
|
actual: unknown;
|
|
221
277
|
expect: string;
|
|
222
278
|
message: string;
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
279
|
+
} | undefined>, readonly [z.ZodCustom<PromiseLike<unknown>, PromiseLike<unknown>>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to fulfill with value satisfying", "to resolve with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
280
|
+
[x: string]: unknown;
|
|
281
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
282
|
+
actual: string;
|
|
283
|
+
expect: string;
|
|
284
|
+
message: string;
|
|
285
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call callback", "to eventually invoke callback"]], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
286
|
+
actual: string;
|
|
287
|
+
expected: string;
|
|
288
|
+
message: string;
|
|
289
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call callback", "to eventually invoke callback"]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback", "to eventually invoke nodeback"]], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
290
|
+
actual: string;
|
|
291
|
+
expected: string;
|
|
292
|
+
message: string;
|
|
293
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call nodeback", "to eventually invoke nodeback"]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call callback with", "to eventually invoke callback with"], z.ZodUnknown], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: unknown) => Promise<z.ZodError<any> | {
|
|
294
|
+
actual: string;
|
|
295
|
+
expected: string;
|
|
296
|
+
message: string;
|
|
297
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call callback with", "to eventually invoke callback with"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call callback with exactly", "to eventually call callback with exact value", "to eventually invoke callback with exactly", "to eventually invoke callback with exact value"], z.ZodUnknown], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, expected: unknown) => Promise<boolean | {
|
|
298
|
+
actual: string;
|
|
299
|
+
expected: string;
|
|
300
|
+
message: string;
|
|
301
|
+
}>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call callback with exactly", "to eventually call callback with exact value", "to eventually invoke callback with exactly", "to eventually invoke callback with exact value"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with", "to eventually invoke nodeback with"], z.ZodUnknown], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: unknown) => Promise<z.ZodError<any> | {
|
|
302
|
+
actual: string;
|
|
303
|
+
expected: string;
|
|
304
|
+
message: string;
|
|
305
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call nodeback with", "to eventually invoke nodeback with"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with exactly", "to eventually call nodeback with exact value", "to eventually invoke nodeback with exactly", "to eventually invoke nodeback with exact value"], z.ZodUnknown], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, expected: unknown) => Promise<boolean | {
|
|
306
|
+
actual: string;
|
|
307
|
+
expected: string;
|
|
308
|
+
message: string;
|
|
309
|
+
}>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call nodeback with exactly", "to eventually call nodeback with exact value", "to eventually invoke nodeback with exactly", "to eventually invoke nodeback with exact value"]>, z.ZodUnknown]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with error", "to eventually invoke nodeback with error"]], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown) => Promise<{
|
|
310
|
+
actual: string;
|
|
311
|
+
expected: string;
|
|
312
|
+
message: string;
|
|
313
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call nodeback with error", "to eventually invoke nodeback with error"]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with a", "to eventually call nodeback with an", "to eventually invoke nodeback with a", "to eventually invoke nodeback with an"], z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, ctor: import("./types.js").Constructor) => Promise<{
|
|
314
|
+
actual: string;
|
|
315
|
+
expected: string;
|
|
316
|
+
message: string;
|
|
317
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call nodeback with a", "to eventually call nodeback with an", "to eventually invoke nodeback with a", "to eventually invoke nodeback with an"]>, z.ZodCustom<import("./types.js").Constructor, import("./types.js").Constructor>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with error", "to eventually invoke nodeback with error"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
318
|
+
[x: string]: unknown;
|
|
319
|
+
}) => Promise<z.ZodError<unknown> | {
|
|
320
|
+
actual: string;
|
|
321
|
+
expected: string;
|
|
322
|
+
message: string;
|
|
323
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call nodeback with error", "to eventually invoke nodeback with error"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call callback with value satisfying", "to eventually invoke callback with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
324
|
+
[x: string]: unknown;
|
|
325
|
+
}) => Promise<z.ZodError<any> | {
|
|
326
|
+
actual: string;
|
|
327
|
+
expected: string;
|
|
328
|
+
message: string;
|
|
329
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call callback with value satisfying", "to eventually invoke callback with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>, import("./types.js").AssertionFunctionAsync<readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, readonly ["to eventually call nodeback with value satisfying", "to eventually invoke nodeback with value satisfying"], z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>], (subject: (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, param: string | RegExp | {
|
|
330
|
+
[x: string]: unknown;
|
|
331
|
+
}) => Promise<z.ZodError<any> | {
|
|
332
|
+
actual: string;
|
|
333
|
+
expected: string;
|
|
229
334
|
message: string;
|
|
230
|
-
|
|
231
|
-
}>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to fulfill with value satisfying", "to resolve with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>]>;
|
|
335
|
+
} | undefined>, readonly [z.ZodCustom<(...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown, (...args: import("./types.js").MutableOrReadonly<unknown[]>) => unknown>, import("./types.js").PhraseLiteralChoiceSlot<readonly ["to eventually call nodeback with value satisfying", "to eventually invoke nodeback with value satisfying"]>, z.ZodUnion<readonly [z.ZodString, z.ZodCustom<RegExp, RegExp>, z.ZodObject<{}, z.core.$loose>]>]>]>;
|
|
232
336
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;;GASG;AACH,YAAY,KAAK,KAAK,MAAM,YAAY,CAAC;AAEzC;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,CAAC;AAEb;;GAEG;AACH,YAAY,EACV,MAAM,EACN,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,EACN,WAAW,EACX,MAAM,EACN,KAAK,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;;;;;;;;GASG;AACH,YAAY,KAAK,KAAK,MAAM,YAAY,CAAC;AAEzC;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,CAAC;AAEb;;GAEG;AACH,YAAY,EACV,MAAM,EACN,iBAAiB,EACjB,sBAAsB,EACtB,MAAM,EACN,WAAW,EACX,MAAM,EACN,KAAK,EACL,UAAU,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAC5D,QAAA;AACE;;;;;;;GAOG;AACH,eAAe;AACf;;;;;;;GAOG;AACH,oBAAoB;AACpB;;;;GAIG;AACH,IAAI;AACJ;;;;GAIG;AACH,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;icAEgB,CAAC"}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAc5C;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE3B,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAc5C;;;GAGG;AACH,OAAO,EAAE,CAAC,EAAE,CAAC;AAeb,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC;AAC5D,MAAM;AACJ;;;;;;;GAOG;AACH,eAAe;AACf;;;;;;;GAOG;AACH,oBAAoB;AACpB;;;;GAIG;AACH,IAAI;AACJ;;;;GAIG;AACH,GAAG,EACH,GAAG,KAAK,EACT,GAAG,iBAAiB,CAAC"}
|
package/dist/esm/schema.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* This module provides reusable Zod schemas for validating constructors,
|
|
5
5
|
* functions, property keys, promises, and other common JavaScript types used
|
|
6
|
-
* throughout the assertion system. These tend to work around the
|
|
6
|
+
* throughout the assertion system. These tend to work around the impedance
|
|
7
7
|
* mismatch between **BUPKIS** and Zod.
|
|
8
8
|
*
|
|
9
9
|
* These are used internally, but consumers may also find them useful.
|
|
@@ -38,7 +38,7 @@ import { type Constructor, type MutableOrReadonly } from './types.js';
|
|
|
38
38
|
*
|
|
39
39
|
* This schema validates values that can be used as constructors, including ES6
|
|
40
40
|
* classes, traditional constructor functions, and built-in constructors. It
|
|
41
|
-
* uses the {@link
|
|
41
|
+
* uses the {@link isConstructible} guard function to determine if a value can be
|
|
42
42
|
* invoked with the `new` operator to create object instances.
|
|
43
43
|
*
|
|
44
44
|
* @privateRemarks
|
|
@@ -198,9 +198,12 @@ export declare const StrongSetSchema: z.ZodCustom<Set<unknown>, Set<unknown>>;
|
|
|
198
198
|
* `Object.prototype`, making them useful as pure data containers or
|
|
199
199
|
* dictionaries.
|
|
200
200
|
*
|
|
201
|
-
* @
|
|
201
|
+
* @privateRemarks
|
|
202
202
|
* The schema is registered in the `BupkisRegistry` with the name
|
|
203
203
|
* `ObjectWithNullPrototype` for later reference and type checking purposes.
|
|
204
|
+
*
|
|
205
|
+
* Changing this to be a `ZodRecord` would be nice, but that would end up
|
|
206
|
+
* blasting away the original object's prototype.
|
|
204
207
|
* @example
|
|
205
208
|
*
|
|
206
209
|
* ```typescript
|
|
@@ -216,6 +219,13 @@ export declare const StrongSetSchema: z.ZodCustom<Set<unknown>, Set<unknown>>;
|
|
|
216
219
|
* ```
|
|
217
220
|
*
|
|
218
221
|
* @group Schema
|
|
222
|
+
* @see Aliases: {@link NullProtoObjectSchema}, {@link DictionarySchema}
|
|
223
|
+
*/
|
|
224
|
+
export declare const DictionarySchema: z.ZodCustom<Record<PropertyKey, unknown>, Record<PropertyKey, unknown>>;
|
|
225
|
+
/**
|
|
226
|
+
* {@inheritDoc DictionarySchema}
|
|
227
|
+
*
|
|
228
|
+
* @group Schema
|
|
219
229
|
*/
|
|
220
230
|
export declare const NullProtoObjectSchema: z.ZodCustom<Record<PropertyKey, unknown>, Record<PropertyKey, unknown>>;
|
|
221
231
|
/**
|
|
@@ -226,7 +236,7 @@ export declare const NullProtoObjectSchema: z.ZodCustom<Record<PropertyKey, unkn
|
|
|
226
236
|
* function's internal `[[ToString]]` representation to distinguish async
|
|
227
237
|
* functions from regular functions that might return Promises.
|
|
228
238
|
*
|
|
229
|
-
* @
|
|
239
|
+
* @privateRemarks
|
|
230
240
|
* The schema is registered in the `BupkisRegistry` with the name
|
|
231
241
|
* `AsyncFunctionSchema` for later reference and type checking purposes. This
|
|
232
242
|
* schema cannot reliably detect functions that return Promises but are not
|
|
@@ -263,7 +273,7 @@ export declare const AsyncFunctionSchema: z.ZodCustom<(...args: MutableOrReadonl
|
|
|
263
273
|
* if it converts to `true` when evaluated in a boolean context - essentially
|
|
264
274
|
* any value that is not one of the eight falsy values.
|
|
265
275
|
*
|
|
266
|
-
* @
|
|
276
|
+
* @privateRemarks
|
|
267
277
|
* The schema is registered in the `BupkisRegistry` with the name `Truthy` and
|
|
268
278
|
* indicates that it accepts anything as valid input for evaluation.
|
|
269
279
|
* @example
|
|
@@ -291,7 +301,7 @@ export declare const TruthySchema: z.ZodNonOptional<z.ZodAny>;
|
|
|
291
301
|
* in JavaScript are: `false`, `0`, `-0`, `0n`, `""` (empty string), `null`,
|
|
292
302
|
* `undefined`, and `NaN`.
|
|
293
303
|
*
|
|
294
|
-
* @
|
|
304
|
+
* @privateRemarks
|
|
295
305
|
* The schema is registered in the `BupkisRegistry` with the name `Falsy` and
|
|
296
306
|
* indicates that it accepts anything as valid input for evaluation.
|
|
297
307
|
* @example
|
|
@@ -323,7 +333,7 @@ export declare const FalsySchema: z.ZodNullable<z.ZodAny>;
|
|
|
323
333
|
* distinguishing them from objects and functions which are non-primitive
|
|
324
334
|
* reference types.
|
|
325
335
|
*
|
|
326
|
-
* @
|
|
336
|
+
* @privateRemarks
|
|
327
337
|
* The schema is registered in the `BupkisRegistry` with the name `Primitive`
|
|
328
338
|
* and indicates that it accepts primitive values as valid input.
|
|
329
339
|
* @example
|
|
@@ -385,7 +395,7 @@ export declare const ArrayLikeSchema: z.ZodUnion<readonly [z.ZodArray<z.ZodUnkno
|
|
|
385
395
|
* It ensures the validated value is a proper regular expression object with all
|
|
386
396
|
* associated methods and properties.
|
|
387
397
|
*
|
|
388
|
-
* @
|
|
398
|
+
* @privateRemarks
|
|
389
399
|
* The schema is registered in the `BupkisRegistry` with the name `RegExp` for
|
|
390
400
|
* later reference and type checking purposes.
|
|
391
401
|
* @example
|
package/dist/esm/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAU3B,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,eAAO,MAAM,WAAW,uCAGU,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,cAAc,wBACP,iBAAiB,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,YAAxC,iBAAiB,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAMzD,CAAC;AAEJ;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,iBAAiB,8DAG4B,CAAC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