-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Open
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Avoid duplicating "readonly" for each property by applying it to the interface definition itself.
This is to reduce boilerplate code defining immutable objects.
Having interface where ALL properties are read only:
interface State {
readonly prop1: string;
readonly prop2: string;
...
readonly prop22: string;
}
equals to:
readonly interface State {
prop1: string;
prop2: string;
...
prop22: string;
}
jwbay, alexrock, Conaclos, aleclarson, RomainMuller and 18 more
Metadata
Metadata
Assignees
Labels
Awaiting More FeedbackThis means we'd like to hear from more people who would be helped by this featureThis means we'd like to hear from more people who would be helped by this featureSuggestionAn idea for TypeScriptAn idea for TypeScript