Saltar al contenido principal

Type Alias: FetchResult<T>

FetchResult<T> = { data: T; error: null; ok: true; status: number; url: string; } | { data: null; error: ApiError; ok: false; status: number; url: string; }

Defined in: src/types/index.ts:252

Safe result, discriminated union (Astro Actions style) without throwing. The ok flag narrows the union between the success and error branches.

Type Parameters

T

T = unknown