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.
@@ -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>>;
@@ -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
@@ -1,5 +1,7 @@
1
1
  var util;
2
2
  (function (util) {
3
+ function assertEqual(_cond) { }
4
+ util.assertEqual = assertEqual;
3
5
  function assertNever(_x) {
4
6
  throw new Error();
5
7
  }
package/lib/index.umd.js CHANGED
@@ -6,6 +6,8 @@
6
6
 
7
7
  var util;
8
8
  (function (util) {
9
+ function assertEqual(_cond) { }
10
+ util.assertEqual = assertEqual;
9
11
  function assertNever(_x) {
10
12
  throw new Error();
11
13
  }
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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod",
3
- "version": "3.17.6",
3
+ "version": "3.17.7",
4
4
  "description": "TypeScript-first schema declaration and validation library with static type inference",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./index.d.ts",