We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I believe it would be useful to have a type PartialRecord. This SO Post has had 13k+ views so I believe this is a commonly desired type.
PartialRecord
PartialRecord, Partial Record
My suggestion meets these guidelines:
New Utility Type: PartialRecord
type PartialRecord<K extends keyof any, T> = Partial<Record<K, T>>;
or
type PartialRecord<K extends keyof any, T> = { [P in K]?: T; };
(from SO Post linked above)
This improves the basic support of Typescripts Utility types by adding support for a commonly desired pattern.
I want to use this for conveniently defining Partial Record types without needing to maintain and import one in each project I need this pattern.
Current workaround is to define your own, but this is obviously not ideal.
The text was updated successfully, but these errors were encountered:
See #39522 (comment):
We've opted to not include utility type aliases in the lib unless they're required for declaration emit purposes.
Sorry, something went wrong.
No branches or pull requests
Suggestion
I believe it would be useful to have a type
PartialRecord
. This SO Post has had 13k+ views so I believe this is a commonly desired type.π Search Terms
PartialRecord, Partial Record
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
New Utility Type:
PartialRecord
or
(from SO Post linked above)
π Motivating Example
This improves the basic support of Typescripts Utility types by adding support for a commonly desired pattern.
π» Use Cases
I want to use this for conveniently defining Partial Record types without needing to maintain and import one in each project I need this pattern.
Current workaround is to define your own, but this is obviously not ideal.
The text was updated successfully, but these errors were encountered: