mirror of
https://github.com/r-freeman/portfolio.git
synced 2024-11-22 16:25:42 +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()
|
|
} |