If you use classes, the compiler may complain because the class has no declared fields.
The compiler will emit JS anyway.
The compiler will emit JS anyway.
class Foo {
foo;
constructor() {
this.foo = 42
}
}
Will be both valid ES2019 or ES2020 and TypeScript.