Skip to content

Commit

Permalink
Make generic optional in objectOutputType
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhacks committed Mar 4, 2023
1 parent b6794a4 commit 3c6cdd2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deno/lib/types.ts
Expand Up @@ -2128,7 +2128,7 @@ export type baseObjectOutputType<Shape extends ZodRawShape> =
export type objectOutputType<
Shape extends ZodRawShape,
Catchall extends ZodTypeAny,
UnknownKeys extends UnknownKeysParam
UnknownKeys extends UnknownKeysParam = UnknownKeysParam
> = ZodTypeAny extends Catchall
? objectUtil.flatten<baseObjectOutputType<Shape>> & Passthrough<UnknownKeys>
: objectUtil.flatten<
Expand All @@ -2149,7 +2149,7 @@ export type Passthrough<UnknownKeys extends UnknownKeysParam> =
export type objectInputType<
Shape extends ZodRawShape,
Catchall extends ZodTypeAny,
UnknownKeys extends UnknownKeysParam
UnknownKeys extends UnknownKeysParam = UnknownKeysParam
> = ZodTypeAny extends Catchall
? baseObjectInputType<Shape> & Passthrough<UnknownKeys>
: objectUtil.flatten<
Expand Down
4 changes: 2 additions & 2 deletions src/types.ts
Expand Up @@ -2128,7 +2128,7 @@ export type baseObjectOutputType<Shape extends ZodRawShape> =
export type objectOutputType<
Shape extends ZodRawShape,
Catchall extends ZodTypeAny,
UnknownKeys extends UnknownKeysParam
UnknownKeys extends UnknownKeysParam = UnknownKeysParam
> = ZodTypeAny extends Catchall
? objectUtil.flatten<baseObjectOutputType<Shape>> & Passthrough<UnknownKeys>
: objectUtil.flatten<
Expand All @@ -2149,7 +2149,7 @@ export type Passthrough<UnknownKeys extends UnknownKeysParam> =
export type objectInputType<
Shape extends ZodRawShape,
Catchall extends ZodTypeAny,
UnknownKeys extends UnknownKeysParam
UnknownKeys extends UnknownKeysParam = UnknownKeysParam
> = ZodTypeAny extends Catchall
? baseObjectInputType<Shape> & Passthrough<UnknownKeys>
: objectUtil.flatten<
Expand Down

0 comments on commit 3c6cdd2

Please sign in to comment.