zod 4.0.1 → 4.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "type": "module",
5
5
  "author": "Colin McDonnell <zod@colinhacks.com>",
6
6
  "description": "TypeScript-first schema declaration and validation library with static type inference",
@@ -2865,9 +2865,10 @@ export const $ZodLiteral: core.$constructor<$ZodLiteral> = /*@__PURE__*/ core.$c
2865
2865
  //////////////////////////////////////////
2866
2866
 
2867
2867
  // provide a fallback in case the File interface isn't provided in the environment
2868
- declare global {
2869
- interface File {}
2870
- }
2868
+ type _File = typeof globalThis extends { File: new (...args: any[]) => any }
2869
+ ? InstanceType<typeof globalThis.File>
2870
+ : {};
2871
+ interface File extends _File {}
2871
2872
 
2872
2873
  export interface $ZodFileDef extends $ZodTypeDef {
2873
2874
  type: "file";
@@ -1,5 +1,5 @@
1
1
  export const version = {
2
2
  major: 4,
3
3
  minor: 0,
4
- patch: 0 as number,
4
+ patch: 2 as number,
5
5
  } as const;
@@ -761,9 +761,10 @@ export interface $ZodLiteral<T extends util.Literal = util.Literal> extends $Zod
761
761
  _zod: $ZodLiteralInternals<T>;
762
762
  }
763
763
  export declare const $ZodLiteral: core.$constructor<$ZodLiteral>;
764
- declare global {
765
- interface File {
766
- }
764
+ type _File = typeof globalThis extends {
765
+ File: new (...args: any[]) => any;
766
+ } ? InstanceType<typeof globalThis.File> : {};
767
+ interface File extends _File {
767
768
  }
768
769
  export interface $ZodFileDef extends $ZodTypeDef {
769
770
  type: "file";
@@ -761,9 +761,10 @@ export interface $ZodLiteral<T extends util.Literal = util.Literal> extends $Zod
761
761
  _zod: $ZodLiteralInternals<T>;
762
762
  }
763
763
  export declare const $ZodLiteral: core.$constructor<$ZodLiteral>;
764
- declare global {
765
- interface File {
766
- }
764
+ type _File = typeof globalThis extends {
765
+ File: new (...args: any[]) => any;
766
+ } ? InstanceType<typeof globalThis.File> : {};
767
+ interface File extends _File {
767
768
  }
768
769
  export interface $ZodFileDef extends $ZodTypeDef {
769
770
  type: "file";
@@ -4,5 +4,5 @@ exports.version = void 0;
4
4
  exports.version = {
5
5
  major: 4,
6
6
  minor: 0,
7
- patch: 0,
7
+ patch: 2,
8
8
  };
@@ -1,5 +1,5 @@
1
1
  export const version = {
2
2
  major: 4,
3
3
  minor: 0,
4
- patch: 0,
4
+ patch: 2,
5
5
  };