swc/crates/swc_ecma_parser/tests/tsc/classPropertyAsPrivate.ts

23 lines
338 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();