No error on `this` expressions in static property declaration initialisers when targetting ESNext and with useDefineForClassFields. In this case the emit is correct and the types are correct, so the error should not be issued.
12 lines
258 B
TypeScript
12 lines
258 B
TypeScript
// @target: esnext
|
|
// @useDefineForClassFields: true
|
|
|
|
// all are allowed with es-compliant class field emit
|
|
class Foo {
|
|
x = this
|
|
static t = this
|
|
static at = () => this
|
|
static ft = function () { return this }
|
|
static mt() { return this }
|
|
}
|