Skip to content

Commit 8e9d674

Browse files
Improve typing for the apiIndex fetch util
1 parent 43c2194 commit 8e9d674

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/apiIndex/fetch.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ export async function fetchApiIndex(url: URL): Promise<ApiIndex> {
1515
throw new Error(`Failed to load API index: ${response.status} ${response.statusText}`)
1616
}
1717

18-
return response.json()
18+
const data = (await response.json()) as ApiIndex
19+
return data
1920
}

0 commit comments

Comments
 (0)