-
-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(types): add override types method #603
feat(types): add override types method #603
Conversation
Concept looks good to me and I believe it'd fix most our type problems. |
Allow both partial and complete override of the return type, do partial override by default
6e990b7
to
5f24f39
Compare
…-add-overrideTypes-method
Started to write some draft for the docs here: supabase/supabase#33705 for when it land. |
Is this meant to be in draft still? |
Nope 😓 |
bfeb5cc
into
avallete/fix-add-returns-to-builder
🎉 This PR is included in version 1.19.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
overrideTypes
method allow both partial and complete override of the return type, do partial override by default@kamilogorek mentioned that we often had to port a lot of properties definition in order to override a single field when using
.returns
method.This new method introduce a way to perform "partial override" per default, and allow the user to have similar behavior than the current
.returns
method by providing the option{ merge: false }
.This make this kind of type override where we only want to override
func_call
result easier to maintain.Before:
After