TypeScript/tests/cases/conformance/classes/members/accessibility/classPropertyAsPrivate.ts
2014-07-12 17:30:19 -07:00

23 lines
No EOL
360 B
TypeScript

class C {
private x: string;
private get y() { return null; }
private set y(x) { }
private foo() { }
private static a: string;
private static get b() { return null; }
private static set b(x) { }
private static foo() { }
}
var c: C;
// all errors
c.x;
c.y;
c.y = 1;
c.foo();
C.a;
C.b();
C.b = 1;
C.foo();