-
Notifications
You must be signed in to change notification settings - Fork 222
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 SelfDescribingJson type to allow optional keys in type parameter (close #1203 and #1304) #1330
Conversation
1c3417f
to
851c6a7
Compare
BundleMonFiles added (6)
Total files change +102.07KB 0% Final result: ❌ View report in BundleMon website ➡️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would like to get feedback from @igneel64 on this but LGTM!
b162da0
to
0bb7954
Compare
Sorry @jethron, you might need to rebase this branch as I rebased the release branch on top of master. |
@jethron can you please merge this into the release branch? I think we can move forward with this. |
Include some Snowtype-generated code as tests.
Include some Snowtype-generated code as tests.
Include some Snowtype-generated code as tests.
Include some Snowtype-generated code as tests.
Record<keyof T,
has the unfortunate side-effect of erasing theoptional
modifier for any properties inT
, essentially mandatingRequired<T>
instead of justT
.Explicitly using an index type removes this erasure while still being largely compatible with the rest of the interface expressed by
Record
.An index type accepting only strings is preferable over plain
{}
because that allows arrays fordata
, which we don't support AFAIK outside of special cases likepayload_data
andcontexts
.Should fix #1203 and #1304.