However in typescript this is not possible because the headers type of Record<string, string> is not assignable to fetchers' AutoInitOptions that extend RequestInit and force the use of Headers type instead of Headers | Record<string, string> | string[][]
Is there a specific reason why headers was overwritten in AutoInitOptions? I get errors when using the Headers constructor for the headers and I would like to use the more loose typing of headers again...
To achieve https://github.com/solid/solid-spec/blob/master/api-rest.md#creating-containers-directories
one can do the following in Javascript:
However in typescript this is not possible because the headers type of
Record<string, string>
is not assignable to fetchers' AutoInitOptions that extend RequestInit and force the use ofHeaders
type instead ofHeaders | Record<string, string> | string[][]
Is there a specific reason why headers was overwritten in AutoInitOptions? I get errors when using the Headers constructor for the headers and I would like to use the more loose typing of headers again...