TypeScript/tests/cases/compiler/es6ModuleClassDeclaration.ts
Mohamed Hegazy 6bcbe824aa Emit export class declaration in es6 format.
Note since we havent yet changed the emitting of class declaration to es6 format,
we are just exporting the constructor function

Conflicts:
	src/compiler/emitter.ts
2015-03-12 10:27:46 -07:00

113 lines
2 KiB
TypeScript

// @target: ES6
export class c {
constructor() {
}
private x = 10;
public y = 30;
static k = 20;
private static l = 30;
private method1() {
}
public method2() {
}
static method3() {
}
private static method4() {
}
}
class c2 {
constructor() {
}
private x = 10;
public y = 30;
static k = 20;
private static l = 30;
private method1() {
}
public method2() {
}
static method3() {
}
private static method4() {
}
}
new c();
new c2();
export module m1 {
export class c3 {
constructor() {
}
private x = 10;
public y = 30;
static k = 20;
private static l = 30;
private method1() {
}
public method2() {
}
static method3() {
}
private static method4() {
}
}
class c4 {
constructor() {
}
private x = 10;
public y = 30;
static k = 20;
private static l = 30;
private method1() {
}
public method2() {
}
static method3() {
}
private static method4() {
}
}
new c();
new c2();
new c3();
new c4();
}
module m2 {
export class c3 {
constructor() {
}
private x = 10;
public y = 30;
static k = 20;
private static l = 30;
private method1() {
}
public method2() {
}
static method3() {
}
private static method4() {
}
}
class c4 {
constructor() {
}
private x = 10;
public y = 30;
static k = 20;
private static l = 30;
private method1() {
}
public method2() {
}
static method3() {
}
private static method4() {
}
}
new c();
new c2();
new c3();
new c4();
new m1.c3();
}