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
I am using the output of toHeader in the fetch API and I see the following error:
error TS2322: Type 'Header' is not assignable to type 'Record<string, string> | Headers | string[][] | undefined'.
Type 'Header' is not assignable to type 'Record<string, string>'.
Index signature is missing in type 'Header'.
136 headers: this.client.toHeader(body)
Any thoughts on how to fix it?
The text was updated successfully, but these errors were encountered:
This seems to be an odd behavior with Typescript, Data, Header & Authorization interfaces need to be declared as a type instead of an interface. For now you can use headers: this.client.toHeader(body) as Record<string, string> while it's solved at library level.
Hi,
I am using the output of
toHeader
in the fetch API and I see the following error:Any thoughts on how to fix it?
The text was updated successfully, but these errors were encountered: