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

Export typings correctly in package.json #6508

Closed
3 of 4 tasks
dd-jonas opened this issue Mar 20, 2023 · 0 comments · Fixed by #6626
Closed
3 of 4 tasks

Export typings correctly in package.json #6508

dd-jonas opened this issue Mar 20, 2023 · 0 comments · Fixed by #6626

Comments

@dd-jonas
Copy link

Clear and concise description of the problem

I noticed when using the new bundler option under moduleResolution in TypeScript 5, that swiper's type declarations are not compatible:

Could not find a declaration file for module 'swiper'. '/node_modules/swiper/swiper.esm.js' implicitly has an 'any' type.
There are types at '/node_modules/swiper/swiper.d.ts', but this result could not be resolved when respecting package.json "exports". The 'swiper' library may need to update its package.json or typings.

Suggested solution

Correctly link the declaration files, as seen in a similar pull request here. Updating the package.json will make this package compatible with the new moduleResolution option.

Alternative

No response

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Would you like to open a PR for this feature?

  • I'm willing to open a PR
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants