diff --git a/deno/lib/helpers/util.ts b/deno/lib/helpers/util.ts index 39e1e8025..25f79c774 100644 --- a/deno/lib/helpers/util.ts +++ b/deno/lib/helpers/util.ts @@ -16,6 +16,7 @@ export namespace util { export type OmitKeys = Pick>; export type MakePartial = Omit & Partial>; + export type Exactly = T & Record, never>; export const arrayToEnum = ( items: U diff --git a/deno/lib/types.ts b/deno/lib/types.ts index 3d0e7ad8b..ecf94a7ff 100644 --- a/deno/lib/types.ts +++ b/deno/lib/types.ts @@ -2675,7 +2675,7 @@ export class ZodObject< }) as any; } - pick( + pick>( mask: Mask ): ZodObject>, UnknownKeys, Catchall> { const shape: any = {}; @@ -2692,7 +2692,7 @@ export class ZodObject< }) as any; } - omit( + omit>( mask: Mask ): ZodObject, UnknownKeys, Catchall> { const shape: any = {}; diff --git a/src/helpers/util.ts b/src/helpers/util.ts index 39e1e8025..25f79c774 100644 --- a/src/helpers/util.ts +++ b/src/helpers/util.ts @@ -16,6 +16,7 @@ export namespace util { export type OmitKeys = Pick>; export type MakePartial = Omit & Partial>; + export type Exactly = T & Record, never>; export const arrayToEnum = ( items: U diff --git a/src/types.ts b/src/types.ts index c7a9fd959..c73377dab 100644 --- a/src/types.ts +++ b/src/types.ts @@ -2676,7 +2676,7 @@ export class ZodObject< }) as any; } - pick( + pick>( mask: Mask ): ZodObject>, UnknownKeys, Catchall> { const shape: any = {}; @@ -2693,7 +2693,7 @@ export class ZodObject< }) as any; } - omit( + omit>( mask: Mask ): ZodObject, UnknownKeys, Catchall> { const shape: any = {};