Typescript/no-parameter-properties
davidgg opened this issue · comments
David GG commented
Rule definition: https://palantir.github.io/tslint/rules/no-parameter-properties/
Parameter properties allow the declaration of class properties using only the constructor with the member access (public, private, protected) , for example:
class Person {
constructor(private firstName: string, private lastName: string) {
}
}
is equivalent to:
class Person {
private firstName: string;
private lastName: string;
constructor(firstName: string, lastName: string) {
this.firstName = firstName;
this.lastName = lastName;
}
}
I prefer the first one since is shorter, I vote for disable this rule.
This rule will be discussed this week in the ruby-tapas.
David GG commented
We want to allow it.