richnologies / ngx-stripe

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

[BUG] After update ngx-stripe to 15.x.x, error accoured #197

Closed 4i-helpynet closed 1 year ago

4i-helpynet commented 1 year ago

Describe the bug On serve: Error: node_modules/ngx-stripe/lib/services/stripe-instance.class.d.ts:105:5 - error TS2416: Property 'paymentRequest' in type 'StripeInstance' 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'.

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


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:
Update ngx-stripe from 14.x to the newest version
richnologies commented 1 year ago

Hi @4i-helpynet, is it possible this is a duplicate of https://github.com/richnologies/ngx-stripe/issues/195?

Can you confirm me exactly which version are you using?

4i-helpynet commented 1 year ago

Sorry, yes, igore this, I'll try to fix it with #195

ranma42 commented 1 year ago

I am hitting the same problems on Angular 14 with ngx-stripe 14.3.0 (while ngx-stripe 14.1.0 seems just fine).

richnologies commented 1 year ago

Hey @ranma42,

My bad, I only apply the change to 15.X.X I will try to release a new v14 version today fixing this problem

richnologies commented 1 year ago

Hay @ranma42, sorry about the delay. Just publish a new version 14.3.1 that should fix this problem.

Please, let me know if that works for you

shriyank-sensussoft commented 1 year ago

Property 'paymentRequest' in type 'StripeInstance' is not assignable to the same property in base type 'StripeServiceInterface'. @richnologies This error is still occurring in 14.3.1

dipankakalita commented 1 year ago

What can we do @richnologies, I am unable to redeploy my site. Is there any solution?

image

richnologies commented 1 year ago

So sorry guys. Just release a new version 14.3.2 Hopefully this one will fix it for good.

Please let me know if it works for you

ranma42 commented 1 year ago

I confirm that 14.3.1 does not fix the build issue, whereas after upgrading to 14.3.2 my app builds just fine 🚀 Thank you!

richnologies commented 1 year ago

Thanks for the feedback @ranma42