28 lines
No EOL
1.1 KiB
Text
28 lines
No EOL
1.1 KiB
Text
tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts(4,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
|
|
|
|
==== tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts (2 errors) ====
|
|
class C {
|
|
static fn() { return this; }
|
|
static get x() { return 1; }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
static set x(v) { }
|
|
~
|
|
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
|
|
constructor(public a: number, private b: number) { }
|
|
static foo: string;
|
|
}
|
|
|
|
var r = C.fn();
|
|
var r2 = r.x;
|
|
var r3 = r.foo;
|
|
|
|
class D extends C {
|
|
bar: string;
|
|
}
|
|
|
|
var r = D.fn();
|
|
var r2 = r.x;
|
|
var r3 = r.foo; |