Files

17 lines
619 B
Plaintext

// === Syntax and Semantic Diagnostics ===
/privatePropertyOfUndefinedThis2.ts(4,9): error TS2322: Type '{}' is not assignable to type 'boolean'.
/privatePropertyOfUndefinedThis2.ts(4,21): error TS2339: Property '#prop' does not exist on type 'any'.
==== /privatePropertyOfUndefinedThis2.ts (2 errors) ====
export class C {
wat(this: any): boolean {
return this.#prop = {};
~~~~~~
!!! error TS2322: Type '{}' is not assignable to type 'boolean'.
~~~~~
!!! error TS2339: Property '#prop' does not exist on type 'any'.
}
}