Closed michael-land closed 1 year ago
new Zodios(definitions, { fetchConfig: { credentials: 'include', } as any, });
I have to cast to any to skip type error, Not sure if this is the recommend way to add native fetch parameters, looks like zodios just forward these props.
https://github.com/ecyrbe/zodios/blob/feature/v11/packages/fetch/src/fetch-provider/fetch.types.ts#L3-L9 https://github.com/ecyrbe/zodios/blob/feature/v11/packages/fetch/src/fetch-provider/fetcher-provider.fetch.ts#L35-L51
maybe we need to improve the FetchProviderConfig typing?
I have no issue autocompleting,
check your ts config file, and enabling "dom" lib should fix your issue :
{ "compilerOptions": { "lib": ["ES2019", "DOM"], ... }, ... }
I have to cast to any to skip type error, Not sure if this is the recommend way to add native fetch parameters, looks like zodios just forward these props.
https://github.com/ecyrbe/zodios/blob/feature/v11/packages/fetch/src/fetch-provider/fetch.types.ts#L3-L9 https://github.com/ecyrbe/zodios/blob/feature/v11/packages/fetch/src/fetch-provider/fetcher-provider.fetch.ts#L35-L51
maybe we need to improve the FetchProviderConfig typing?