Skip to content

๐Ÿ”ท Async/Await

async function get<T>(url: string): Promise<T> {
const r = await fetch(url);
return r.json() as Promise<T>;
}