-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work in ESM #7
Comments
Interesting, sounds like zod has the dual-package hazard. Probably can be worked around by making a helper function with a guard return type, which checks the constructor name or something. |
@kran6a I just published a prerelease version which should help with this. You can install with I was able to repro the issue and that the new version fixes. #8. Could you try it out? |
It works! Thanks for the quick fix |
Reproduction
If you add console.log({parsedArgv}) on trpc-cli index.ts you can see why it does not work:
Apparently import {z} from "zod" and require("zod") are not importing the same classes thus instanceof does not work as intended.
The text was updated successfully, but these errors were encountered: