Skip to content

Resolver types are not exported correctly for modern node #35

Description

@smonist

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/resolvers@1.1.0

Steps to reproduce

  • use a tsconfig with "moduleResolution": "Bundler"
  • import { zodResolver } from '@vorms/resolvers/zod';

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions