Skip to content
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

fix: weaken JsonObject type to allow types from payload-types being assigned to it #7815

Merged
merged 2 commits into from
Aug 22, 2024

Conversation

AlessioGr
Copy link
Member

@AlessioGr AlessioGr commented Aug 22, 2024

This fixes that type in the website template:

Now, JsonObject still ensures that only objects can be passed, but it's weak enough to allow non-dynamic types like the ones we generate in payload-types.

The "JSON" part of this type has no meaning anymore, as it does allow objects with functions now. However, we can still use it to signal to the user that this should be JSON-serializable. It's more clear than just using Record<string, unknown>

@AlessioGr AlessioGr merged commit c2b2f10 into beta Aug 22, 2024
48 checks passed
@AlessioGr AlessioGr deleted the fix/weaken-jsonobject-type branch August 22, 2024 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant