Skip to content

Commit

Permalink
Make generic optional in objectOutputType
Browse files Browse the repository at this point in the history
colinhacks committed Mar 4, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b6794a4 commit 3c6cdd2
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions deno/lib/types.ts
Original file line number Diff line number Diff line change
@@ -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<
@@ -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<
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -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<
@@ -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<

0 comments on commit 3c6cdd2

Please sign in to comment.