Files
tsgo/testdata/baselines/reference/compiler/declarationEmitInferredObjectLiteralWithThis.errors.txt
2026-06-03 20:23:19 +00:00

21 lines
864 B
Plaintext

declarationEmitInferredObjectLiteralWithThis.ts(2,5): error TS2527: The inferred type of 'foo' references an inaccessible 'this' type. A type annotation is necessary.
declarationEmitInferredObjectLiteralWithThis.ts(8,5): error TS2527: The inferred type of 'prop' references an inaccessible 'this' type. A type annotation is necessary.
==== declarationEmitInferredObjectLiteralWithThis.ts (2 errors) ====
export class C {
foo() {
~~~
!!! error TS2527: The inferred type of 'foo' references an inaccessible 'this' type. A type annotation is necessary.
return {
self: this,
};
}
prop = {
~~~~
!!! error TS2527: The inferred type of 'prop' references an inaccessible 'this' type. A type annotation is necessary.
self: this,
};
}