Closed bigtimebuddy closed 3 years ago
Implementing the last two cases it bit more complicated so will finish next weekend.
@bigtimebuddy I don't think marking getter-only properties is going to get in since it is too complex. Child classes can easily make it "unreadonly" which would mean the same symbol can both have a readonly behavior and not. I'm not even sure that child classes providing a setter to a parent's getter would properly be merged into one property.
JSDoc had a
@readonly
tag (it also supported the@readOnly
variant), this would set a flag on the doc which could be used by the template to display if a property is writable or not. This should probably be a first-class citizen both to support backward compatibility with JSDoc, but also so that we could infer readonly from a few situations such as these:TypeScript keyword
Using const
Getter with no Setter