-
-
Notifications
You must be signed in to change notification settings - Fork 105
Closed
Labels
Description
I've been trying to create a reusable client with automatic expired token refresh.
Unfortunately, when adding the QueryStringAddon something's getting broken with the typings and I can't create a global resolve with unauthorized.
I'm getting this TS error:
The 'this' context of type 'Wretch<QueryStringAddon, unknown, undefined>' is not assignable to method's 'this' of type 'QueryStringAddon & Wretch<QueryStringAddon, unknown, undefined>'.
Property 'query' is missing in type 'Wretch<QueryStringAddon, unknown, undefined>' but required in type 'QueryStringAddon'.(2684)
Here's a reproduction: https://stackblitz.com/edit/vitejs-vite-5per8h?file=src%2Fapi.ts
Would appreciate any help 🙏