Skip to content

Add type inference for all properties of an object #9

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

Merged
merged 6 commits into from
Mar 31, 2023

Conversation

arnold095
Copy link
Contributor

Previously, the Primitives utility type inferred a single type for all properties of an entity instead of inferring the type for each property individually. This caused problems when an entity had properties of different types.

The error can be seen on this playground

This fix changes the way type is inferred for each property individually instead of inferring a single type for all properties. This allows TypeScript to correctly infer primitive types for each property instead of inferring a single type for all properties.

This is the playground with the fix

@JavierCane JavierCane merged commit d718fb3 into CodelyTV:main Mar 31, 2023
@JavierCane
Copy link
Member

PR merged!

Thx for your contribution!!

This was referenced Feb 4, 2025
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.

2 participants