Skip to content
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

Resolver types are not exported correctly for modern node #35

Open
smonist opened this issue Aug 21, 2023 · 0 comments
Open

Resolver types are not exported correctly for modern node #35

smonist opened this issue Aug 21, 2023 · 0 comments

Comments

@smonist
Copy link
Contributor

smonist commented Aug 21, 2023

Describe the bug

The types of the resolver package are exported in a way that is not compatible with moduleResolution: "Bundler". You can check the compatibility table here.

Detailed error message:

Could not find a declaration file for module '@vorms/resolvers/zod'. '/home/simon/ssp/node_modules/@vorms/resolvers/zod/dist/index.esm.mjs' implicitly has an 'any' type.
  Try `npm i --save-dev @types/vorms__resolvers` if it exists or add a new declaration (.d.ts) file containing `declare module '@vorms/resolvers/zod';`ts(7016)

This can be easily fixed by adding a 'types' field to the exports. I will open a PR in a minute.

Reproduction

https://publint.dev/@vorms/[email protected]

Steps to reproduce

  • use a tsconfig with "moduleResolution": "Bundler"
  • import { zodResolver } from '@vorms/resolvers/zod';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant