Skip to main content

@rtorcato/supabase-common / PostgrestLike

Interface: PostgrestLike<T>

Defined in: unwrap.ts:9

The shape every Supabase / PostgREST call resolves to: exactly one of data or error is meaningful. unwrap collapses that into the value (or a throw), so callers stop writing if (error) throw error everywhere.

Structural only — no @supabase/supabase-js dependency, so it works with any result that carries { data, error }.

Type Parameters

T

T

Properties

data

data: T | null

Defined in: unwrap.ts:10


error

error: { message: string; code?: string; details?: string; } | null

Defined in: unwrap.ts:11