Support readonly types with inference #32812
Labels
Needs Proposal
This issue needs a plan that clarifies the finer details of how it could be implemented.
Suggestion
An idea for TypeScript
Search Terms
readonly without type
Suggestion
Today, in order to use a readonly type with inference you need to know
typeof
existsIt would be nice to support shorthand syntax for this:
Where the lack of a definition outside of
readonly
implies you want to keep the inferred type.Use Cases
Making it cheaper syntactically to use
readonly
more often without using slightly more esoteric typescript features.Could be negated by these though:
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: