mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-13 17:45:41 +00:00
7 lines
181 B
TypeScript
7 lines
181 B
TypeScript
|
export default async function fetcher<JSON = any>(
|
||
|
input: RequestInfo,
|
||
|
init?: RequestInit
|
||
|
): Promise<JSON> {
|
||
|
const res = await fetch(input, init)
|
||
|
return res.json()
|
||
|
}
|