fix(typegen): typescript: deprecate Json type in favour of unknown#750
fix(typegen): typescript: deprecate Json type in favour of unknown#750isaacharrisholt wants to merge 2 commits intosupabase:masterfrom
Json type in favour of unknown#750Conversation
|
Hi there ! Thank you for your contribution ! This looks great, and would also help when overriding the Database default Such override will result in a non-clean merge object (some union will happen) if they type merged to is However, I would keep this as a flagged feature change for now, similar to the It'll allow us to deploy the change gradually and still offer users for who it might be a breaking change to gradually opt-in and refactor when they're ready. Without breaking their types definitions. Maybe something like Edit: Another thing to consider is that the This will probably need to be changed as well so for consistency with this change 🤔 So this might end up being more of a breaking change than expected. The only way I can think of doing this without breaking change is by refactoring the types inference to have a dynamic "Json" type instead of a static one, but it might not be worth it though if that's not the way we want to go moving forward. |
What kind of change does this PR introduce?
Bug fix
What is the current behavior?
#676
What is the new behavior?
Jsonhas been marked as deprecated and is now just equivalent tounknown.FIxes #676