#wulff-stripejs-typescript
1 messages · Page 1 of 1 (latest)
Hi, what does 'my app does not know what Stripe and I cannot see which methods I can call or their types' mean? What are you really trying to do? What integration guide are you following? Are you able to add a bit more details here so I can best assist?
If I import the stripe sdk, the editor will autocomplete things and have typescript definitions
For JS, of course
But I assume including someitnhg like this would be fine? https://github.com/vue-stripe/vue-stripe
Given that it is "an official stripe partner"
Hm it doesn't support Vue3 yet unfortunately
That is correct, it's our partner https://stripe.com/partners/directory/vue-stripe. However, I'm still unsure where you're blocked.
I'm not following any guide at the moment, we just use Vue3 and the SDK from your CDN
I'm just confused about how I can include the library in my project and get the typescript definitions etc.
It works, I just have no code assistance as I cannot import anything when the SDK is not in my package.json
Is there a separate package that only includes types, perhaps?
Where I would then manually add the script tag but rely on the type package for autocompletion etc
https://github.com/stripe/stripe-js I think you want this
wulff-stripejs-typescript
But that one says:
Use Stripe.js as an ES module.
Note: To be PCI compliant, you must load Stripe.js directly from https://js.stripe.com. You cannot include it in a bundle or host it yourself. This package wraps the global Stripe function provided by the Stripe.js script as an ES module.
That's a little cryptic. Can I or can I not include this package?
you can include this package, you just can't cache Stripe.js locally
but my entire app gets bundled into one app.js file with this one in it, no?
When compiling
it's fine, it will just work, try this package
Okay so I just do the "import as a side effect" section?
yes
Alright