Update types

This commit is contained in:
Adria Navarro 2025-01-23 12:25:10 +01:00
parent 5f508ad7ca
commit 19bfd71096
1 changed files with 3 additions and 3 deletions

View File

@ -101,12 +101,12 @@ export const fetchData = <
// Creates an empty fetch instance with no datasource configured, so no data
// will initially be loaded
const createEmptyFetchInstance = ({
const createEmptyFetchInstance = <T extends DataFetchDatasource>({
API,
datasource,
}: {
API: APIClient
datasource: DataFetchDatasource
datasource: T
}) => {
const handler = DataFetchMap[datasource?.type]
if (!handler) {
@ -114,7 +114,7 @@ const createEmptyFetchInstance = ({
}
return new handler({
API,
datasource: null as never,
datasource: datasource as any,
query: null as any,
})
}