stripe-js: [BUG]: Types are very incorrect in the package now in 3.x

What happened?

Attempting to install the package in a remix app. Types are fully broken for this package. You can see the incorrect fields in https://publint.dev.

app/routes/settings.pay.$plan.tsx:4:28 - error TS7016: Could not find a declaration file for module '@stripe/stripe-js'. '/Users/mikecousins/dev/foos/node_modules/.pnpm/@stripe+stripe-js@3.0.0/node_modules/@stripe/stripe-js/dist/stripe.mjs' implicitly has an 'any' type.
  There are types at '/Users/mikecousins/dev/foos/node_modules/@stripe/stripe-js/types/index.d.ts', but this result could not be resolved when respecting package.json "exports". The '@stripe/stripe-js' library may need to update its package.json or typings.

4 import { loadStripe } from '@stripe/stripe-js';

Environment

  • Typescript
  • Remix

Reproduction

https://publint.dev/@stripe/stripe-js@3.0.0

About this issue

  • Original URL
  • State: closed
  • Created 5 months ago
  • Comments: 20 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Please download version v3.0.5 for corrected type declarations. Additionally, this issue has been remediated fully by release v3.0.4, so I’m going to close this issue. Thank you all for your patience up to this point. Please open a new issue if you continue to see related issues.

looks great, thanks @fruchtose-stripe

Please download version v3.0.5 for corrected type declarations. Additionally, this issue has been remediated fully by release v3.0.4, so I’m going to close this issue. Thank you all for your patience up to this point. Please open a new issue if you continue to see related issues.