Something went wrong. Try again.
Monorepo for Tangled forked from tangled.org/core
Something went wrong. Try again.
1234567891011121314export const fetchJson = async <T>( fetch: typeof globalThis.fetch, url: string, timeout: number): Promise<T | null> => { try { const res = await fetch(url, { signal: AbortSignal.timeout(timeout) }); if (!res.ok) return null; return (await res.json()) as T; } catch { return null; }};