You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
All data returned by Spree must be typed in TypeScript. Doing so makes it easier to use in projects written in TypeScript that use the SDK. The current solution uses explicit typecasting to set the returned type. Using generics is safer.
Describe the solution you'd like.
Change return (await this.spreeResponse('patch', routes.checkoutNextPath(), token, params)) as IOrderResult into return (await this.spreeResponse<IOrder>('patch', routes.checkoutNextPath(), token, params)).
Describe alternatives you've considered.
-
Additional context
-
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
All data returned by Spree must be typed in TypeScript. Doing so makes it easier to use in projects written in TypeScript that use the SDK. The current solution uses explicit typecasting to set the returned type. Using generics is safer.
Describe the solution you'd like.
Change
return (await this.spreeResponse('patch', routes.checkoutNextPath(), token, params)) as IOrderResult
intoreturn (await this.spreeResponse<IOrder>('patch', routes.checkoutNextPath(), token, params))
.Describe alternatives you've considered.
-
Additional context
-
The text was updated successfully, but these errors were encountered: