49 lines
No EOL
2.2 KiB
Text
49 lines
No EOL
2.2 KiB
Text
tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts(2,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts(15,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts(20,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts(27,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
|
|
==== tests/cases/conformance/classes/propertyMemberDeclarations/memberAccessorDeclarations/typeOfThisInAccessor.ts (5 errors) ====
|
|
class C {
|
|
get x() {
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
var r = this; // C
|
|
return 1;
|
|
}
|
|
|
|
static get y() {
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
var r2 = this; // typeof C
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
class D<T> {
|
|
a: T;
|
|
get x() {
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
var r = this; // D<T>
|
|
return 1;
|
|
}
|
|
|
|
static get y() {
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
var r2 = this; // typeof D
|
|
return 1;
|
|
}
|
|
}
|
|
|
|
var x = {
|
|
get a() {
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
var r3 = this; // any
|
|
return 1;
|
|
}
|
|
} |