mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
46 lines
701 B
TypeScript
46 lines
701 B
TypeScript
//// [tests/cases/conformance/classes/members/accessibility/classPropertyIsPublicByDefault.ts] ////
|
|
|
|
//// [classPropertyIsPublicByDefault.ts]
|
|
class C {
|
|
x: string;
|
|
get y() { return null; }
|
|
set y(x) { }
|
|
foo() { }
|
|
|
|
static a: string;
|
|
static get b() { return null; }
|
|
static set b(x) { }
|
|
static foo() { }
|
|
}
|
|
|
|
var c: C;
|
|
c.x;
|
|
c.y;
|
|
c.y = 1;
|
|
c.foo();
|
|
|
|
C.a;
|
|
C.b();
|
|
C.b = 1;
|
|
C.foo();
|
|
|
|
//// [classPropertyIsPublicByDefault.js]
|
|
"use strict";
|
|
class C {
|
|
get y() { return null; }
|
|
set y(x) { }
|
|
foo() { }
|
|
static get b() { return null; }
|
|
static set b(x) { }
|
|
static foo() { }
|
|
}
|
|
var c;
|
|
c.x;
|
|
c.y;
|
|
c.y = 1;
|
|
c.foo();
|
|
C.a;
|
|
C.b();
|
|
C.b = 1;
|
|
C.foo();
|