Skip to content

Conversation

avallete
Copy link
Member

@avallete avallete commented Oct 7, 2025

…seClient leverage inference

We currently duplicate a lot of the typing logic between postgrest-js and supabase-js This makes it very hard to change anything type-wise in postgrest-js without needing to update supabase-js as well. This is mainly because we re-declare functions type returns instead of relying over return type inference.

With this change, as long as the arguments passed to a rest function don't change, the result type will be infered from the this.rest call.

This will allows postgrest-js to alter the result types / implementation details without having to duplicate all changes over to supabase-js.

…seClient leverage inference

We currently duplicate a lot of the typing logic between postgrest-js and supabase-js
This makes it very hard to change anything type-wise in postgrest-js
without needing to update supabase-js as well. This is mainly because we
re-declare functions type returns instead of relying over return type
inference.

With this change, as long as the arguments passed to a rest function
don't change, the result type will be infered from the this.rest call.

This will allows postgrest-js to alter the result types / implementation
details without having to duplicate all changes over to supabase-js.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant