Trying to redefine Client
fetch
makes Typescript angry
#3433
-
I'm trying to capture some authorization headers when using urql and this snippet:
makes Typescript complain:
I've tried several approaches, however using I'm crossposting here because I'm starting to think that this may be related to undici-types and some definition lying deep under Anyway, any help in making Typescript happy will be most welcomed :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Just from a quick glance, if I had to guess, the problems here are either all of or several of:
Mainly, I'd check why the types aren't overloading/combining/applying in the same way. That being said, to point out the obvious; no matter whether the types conflict, that's a type issue and if you try to solve this by writing a proxy function (be it on tl;dr in short, if it's not obvious how to reconcile the declarations in undici, |
Beta Was this translation helpful? Give feedback.
Just from a quick glance, if I had to guess, the problems here are either all of or several of:
Mainly, I'd check why the types aren't overloading/combining/applying in the same way. That being said, to point out the obvious; no matter whether the types conflict, that's a type issue and if you try to solve this by writing a proxy function (be it on
global.…