zod 3.17.6 → 3.17.7
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/lib/helpers/util.d.ts +1 -0
- package/lib/helpers/util.js +2 -0
- package/lib/index.mjs +2 -0
- package/lib/index.umd.js +2 -0
- package/lib/types.d.ts +2 -2
- package/package.json +1 -1
package/lib/helpers/util.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare namespace util {
|
|
2
2
|
type AssertEqual<T, Expected> = [T] extends [Expected] ? [Expected] extends [T] ? true : false : false;
|
|
3
|
+
function assertEqual<A, B>(_cond: AssertEqual<A, B>): void;
|
|
3
4
|
function assertNever(_x: never): never;
|
|
4
5
|
type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
|
5
6
|
type OmitKeys<T, K extends string> = Pick<T, Exclude<keyof T, K>>;
|
package/lib/helpers/util.js
CHANGED
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getParsedType = exports.ZodParsedType = exports.util = void 0;
|
|
4
4
|
var util;
|
|
5
5
|
(function (util) {
|
|
6
|
+
function assertEqual(_cond) { }
|
|
7
|
+
util.assertEqual = assertEqual;
|
|
6
8
|
function assertNever(_x) {
|
|
7
9
|
throw new Error();
|
|
8
10
|
}
|
package/lib/index.mjs
CHANGED
package/lib/index.umd.js
CHANGED
package/lib/types.d.ts
CHANGED
|
@@ -518,9 +518,9 @@ export declare class ZodFunction<Args extends ZodTuple<any, any>, Returns extend
|
|
|
518
518
|
returnType(): Returns;
|
|
519
519
|
args<Items extends Parameters<typeof ZodTuple["create"]>[0]>(...items: Items): ZodFunction<ZodTuple<Items, ZodUnknown>, Returns>;
|
|
520
520
|
returns<NewReturnType extends ZodType<any, any>>(returnType: NewReturnType): ZodFunction<Args, NewReturnType>;
|
|
521
|
-
implement<F extends InnerTypeOfFunction<Args, Returns>>(func: F): F
|
|
521
|
+
implement<F extends InnerTypeOfFunction<Args, Returns>>(func: F): ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
522
522
|
strictImplement(func: InnerTypeOfFunction<Args, Returns>): InnerTypeOfFunction<Args, Returns>;
|
|
523
|
-
validate: <F extends InnerTypeOfFunction<Args, Returns>>(func: F) => F
|
|
523
|
+
validate: <F extends InnerTypeOfFunction<Args, Returns>>(func: F) => ReturnType<F> extends Returns["_output"] ? (...args: Args["_input"]) => ReturnType<F> : OuterTypeOfFunction<Args, Returns>;
|
|
524
524
|
static create: <T extends ZodTuple<any, any> = ZodTuple<[], ZodUnknown>, U extends ZodTypeAny = ZodUnknown>(args?: T | undefined, returns?: U | undefined, params?: RawCreateParams) => ZodFunction<T, U>;
|
|
525
525
|
}
|
|
526
526
|
export interface ZodLazyDef<T extends ZodTypeAny = ZodTypeAny> extends ZodTypeDef {
|