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: jsonValue() type is generic #6865

Merged
merged 3 commits into from Feb 11, 2021
Merged

fix: jsonValue() type is generic #6865

merged 3 commits into from Feb 11, 2021

Conversation

jackfranklin
Copy link
Collaborator

During the migration to TS we changed jsonValue so it returned
<Record<string, unknown>>. This is only true if all the JSON values it
returns are objects; but it could return an array, a string, a number,
etc. Therefore we make the type generic, setting the default to
unknown, so the user has control over the type.

During the migration to TS we changed `jsonValue` so it returned
`<Record<string, unknown>>`. This is only true if all the JSON values it
returns are objects; but it could return an array, a string, a number,
etc. Therefore we make the type generic, setting the default to
`unknown`, so the user has control over the type.
@jackfranklin
Copy link
Collaborator Author

Test failures look like FF, which #6864 should resolve for now

@jackfranklin jackfranklin enabled auto-merge (squash) February 11, 2021 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants