Skip to content

isPostgrestSuccess

isPostgrestSuccess<T>(response): response is PostgrestResponse<T> & { data: T; error: null }

Type guard to check if a PostgrestResponse is successful (has data)

Type Parameter
T
Parameter Type Description
response PostgrestResponse<T> The Postgrest response to check

response is PostgrestResponse<T> & { data: T; error: null }

true if the response has data and no error