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

Add typings to package.json export #27

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

indratjhai
Copy link
Contributor

When importing the package in a project made with Vite, eslint was complaining it could not find type definitions.

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

This seems to be a related issue to microsoft/TypeScript#52363 which can be fixed by adding the types property under exports in package.json.

@indratjhai
Copy link
Contributor Author

indratjhai commented Sep 6, 2023

Hi @softbeehive, could you have a look into this PR when you get a chance? Let me know if I can improve the PR in any way.

@softbeehive
Copy link
Contributor

Hi, thanks for your PR!

It would be nice to have a reproducible link, so we can test the issue before/after the fix. Do you have time to simulate the issue on stackblitz?

Then I can prepare minor release, probably some dev packages require updates along the way

@stephen-cli
Copy link

stephen-cli commented Sep 11, 2023

Hi, thanks for your PR!

It would be nice to have a reproducible link, so we can test the issue before/after the fix. Do you have time to simulate the issue on stackblitz?

Then I can prepare minor release, probably some dev packages require updates along the way

@softbeehive Hello. I've managed to reproduce the issue on Code Sandbox if that helps.
https://codesandbox.io/p/sandbox/lingering-currying-qhn9ly?file=%2Fsrc%2FApp.vue%3A3%2C9

@memcorrupt
Copy link

+1: this issue also affects my private codebase

@softbeehive softbeehive merged commit fa74340 into ectoflow:main Feb 19, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

4 participants