prefer-readonly: inline lambdas
Closed this issue · 2 comments
christophka commented
TSLint rule prefer-readonly
Shall we allow inline lambdas? The difference would be inside a class were
private toggleInfo = (): void => {... }
would yield an error. The fix would be adding readonly
private readonly toggleInfo = (): void => {... }
I don't really have a preference on that one, except for having the rule itself activated.
maschino commented
I like this solution:
"prefer-readonly": [true, "only-inline-lambdas"]
christophka commented
Since the option does not do that, that we thought, I will disable the rule completely