Update Type Imports for ngx-stripe
mainIn recent versions of ngx-stripe, the library no longer maintains its own custom types. Instead, it uses official Stripe types.
Crucial Change: You must now import most types from @stripe/stripe-js instead of ngx-stripe.
Type Mapping Reference:
| Legacy (ngx-stripe) | Active (Import from @stripe/stripe-js) |
|---|---|
Options | StripeConstructorOptions |
StripeJS | Stripe |
ElementsOptions | StripeElementsOptions |
Element | StripeElement |
Elements | StripeElements |
PaymentIntentResult | { paymentIntent?: PaymentIntent; error?: StripeError; } |
CardSetupResult | { setupIntent?: SetupIntent; error?: StripeError; } |
TokenResult | { token?: Token; error?: StripeError } |