1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
tests/cases/conformance/classes/members/privateNames/main.ts(3,12): error TS2807: This syntax requires an imported helper named '__classPrivateFieldSet' with 5 parameters, which is not compatible with the one in 'tslib'. Consider upgrading your version of 'tslib'.
tests/cases/conformance/classes/members/privateNames/main.ts(4,25): error TS2807: This syntax requires an imported helper named '__classPrivateFieldGet' with 4 parameters, which is not compatible with the one in 'tslib'. Consider upgrading your version of 'tslib'.
==== tests/cases/conformance/classes/members/privateNames/main.ts (2 errors) ====
export class C {
#a = 1;
#b() { this.#c = 42; }
~~~~~~~
!!! error TS2807: This syntax requires an imported helper named '__classPrivateFieldSet' with 5 parameters, which is not compatible with the one in 'tslib'. Consider upgrading your version of 'tslib'.
set #c(v: number) { this.#a += v; }
~~~~~~~
!!! error TS2807: This syntax requires an imported helper named '__classPrivateFieldGet' with 4 parameters, which is not compatible with the one in 'tslib'. Consider upgrading your version of 'tslib'.
}
==== tests/cases/conformance/classes/members/privateNames/tslib.d.ts (0 errors) ====
// these are pre-TS4.3 versions of emit helpers, which only supported private instance fields
export declare function __classPrivateFieldGet<T extends object, V>(receiver: T, state: any): V;
export declare function __classPrivateFieldSet<T extends object, V>(receiver: T, state: any, value: V): V;
|