Anyone have an opinion on this field assignment to this
in classes?
export class App {
foo = this.bar;
constructor(public bar){
}
}
it compiles to the same thing as:
export class App {
foo;
constructor(public bar){
this.foo = bar;
}
}
1st option and maybe I would express my intentions a little better with a getter. If foo is a computed property or is pointing at something else, I would probably do "get foo() { return this.bar; }"