TypeScript/tests/baselines/reference/classWithStaticMembers.errors.txt

24 lines
716 B
Text
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/conformance/classes/members/constructorFunctionTypes/classWithStaticMembers.ts (2 errors) ====
class C {
static fn() { return this; }
static get x() { return 1; }
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
static set x(v) { }
~
!!! 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;