8 lines
168 B
TypeScript
8 lines
168 B
TypeScript
|
export default async function f<JSON = any>(
|
||
|
input: RequestInfo,
|
||
|
init?: RequestInit
|
||
|
): Promise<JSON> {
|
||
|
const res = await fetch(input, init)
|
||
|
return res.json()
|
||
|
}
|