-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript
Description
Could it be possible to implement different access modifier for getter and setter? This way the setter could be for example private/protected and the getter public. In some cases this in really useful when the value shall be read-only.
Example:
class MyClass {
private _myProp: any;
private set myProp(value: any) {
this._myProp = value;
}
public get myProp(): any {
return this._myProp;
}
}
Elephant-Vessel, adamk33n3r, RichiCoder1, AppLover69, seivan and 140 moreluketanner, kanatkubash, HealGaren, patricio-ezequiel-hondagneu-roig, tadhgmister and 20 more
Metadata
Metadata
Assignees
Labels
In DiscussionNot yet reached consensusNot yet reached consensusSuggestionAn idea for TypeScriptAn idea for TypeScript