8000 ZodObject not assignable to ZodTypeAny · colinhacks zod · Discussion #1993 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ZodObject not assignable to ZodTypeAny #1993

Discussion options

You must be logged in to vote

I have tried this, and everything is working as expected.

// 1.ts
import { z } from 'zod'

export const foo = z.object( {
    test: z.string(),
} )
// 2.ts
import { foo } from "./1.ts"
const foobar = z.object( {
    bar: foo,
} )
// no errors

Can you please provide your package.json and tsconfig.json?

Alternatively, you could provide a link to a codesandbox or something that has everything the way you do.

Replies: 9 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@realwitt
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by JacobWeisenburger
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants
Converted from issue

This discussion was converted from issue #1960 on February 06, 2023 13:08.

0