richnologies / ngx-stripe

Angular 6+ wrapper for StripeJS
MIT License
219 stars 77 forks source link

[BUG] Property 'paymentRequest' in type 'StripeService' is not assignable to the same property in base type 'StripeServiceInterface' #195

Closed selected-pixel-jameson closed 1 year ago

selected-pixel-jameson commented 1 year ago

Describe the bug After updating my Angular project to 15.1.0 I'm getting the following error when trying to compile the project.

Error: node_modules/ngx-stripe/lib/services/stripe.service.d.ts:109:5 - error TS2416: Property 'paymentRequest' in type 'StripeService' is not assignable to the same property in base type 'StripeServiceInterface'.
  Type '(options: PaymentRequestOptions) => PaymentRequest | undefined' is not assignable to type '(options: PaymentRequestOptions) => PaymentRequest'.
    Type 'PaymentRequest | undefined' is not assignable to type 'PaymentRequest'.
      Type 'undefined' is not assignable to type 'PaymentRequest'.

109     paymentRequest(options: PaymentRequestOptions): PaymentRequest | undefined;

To Reproduce Steps to reproduce the behavior: Instal Angular 15.1.0 and ngx-stripe 15.0.0

Expected behavior I expect my project to compile successfully.

Desktop (please complete the following information):

Additional context This was working fine before I updated to Angular 15.1.0 and ngx-stripe 15.0.0.

selected-pixel-jameson commented 1 year ago

Note that if I disable "strict" compiling in my tsconfig.json this issue goes away.

richnologies commented 1 year ago

Good morning @selected-pixel-jameson,

Thanks for raising this problem, really appreciate it.

I've release a new version to npm 15.1.1 that should fix the problem, but I did not have much time to test it. I'd really appreciate if you can confirm me if this works for you.

Regards,

R

selected-pixel-jameson commented 1 year ago

Issue has been resolved. Thank you!