capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
MIT License
185 stars 74 forks source link

No type definitions available in project #23

Closed DwieDima closed 2 years ago

DwieDima commented 3 years ago

Describe the bug I'm not sure if this is a bug or not, but when i import Stripe to my service i won't get any autocompletion, although I saw in your code that you provide some.

const { Stripe } = Plugins;

This is probably related to this issue.

My current workaround is to import your definitions in my service:

import { StripePlugin } from 'capacitor-stripe/dist/esm/definitions';
const Stripe = Plugins.Stripe as StripePlugin;

Is there any better way to get typesafety or is this the way to go?

rdlabo commented 2 years ago

Thanks for issue! Today this plugin of v3 is released. This not compatible with v1. All APIs have been revamped. So I will close this issue. If you still have the same problem, please create a new Issue. Thank you.