supabase / postgrest-js

Isomorphic JavaScript client for PostgREST.
https://supabase.com
MIT License
965 stars 129 forks source link

Export PostgrestResponseSuccess and PostgrestResponseFailure #396

Closed kjrocker closed 1 year ago

kjrocker commented 1 year ago

What kind of change does this PR introduce?

Type change. Discussion here: https://github.com/supabase/supabase/discussions/12228

What is the current behavior?

Only the top-level PostgrestResponse types are exported.

What is the new behavior?

Export the sub-types that go into PostgrestResponse for type-union/guard-clause purposes.

Additional context

I noticed the plan is to rename PostgrestSingleResponse and deprecate the current PostgrestResponse, so instead of exporting PostgrestSingleResponseSuccess under its current name I went with PostgrestResponseSuccess.

This might mean holding the change back until v3, but since its to a (formely) internal type we should be okay.

mqp commented 1 year ago

This would be convenient for me too.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: