1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
//// [emitClassDeclarationWithMethodInES6.ts]
class D {
_bar: string;
foo() { }
["computedName1"]() { }
["computedName2"](a: string) { }
["computedName3"](a: string): number { return 1; }
bar(): string {
return this._bar;
}
baz(a: any, x: string): string {
return "HELLO";
}
static ["computedname4"]() { }
static ["computedname5"](a: string) { }
static ["computedname6"](a: string): boolean { return true; }
static staticMethod() {
var x = 1 + 2;
return x
}
static foo(a: string) { }
static bar(a: string): number { return 1; }
}
//// [emitClassDeclarationWithMethodInES6.js]
class D {
foo() { }
["computedName1"]() { }
["computedName2"](a) { }
["computedName3"](a) { return 1; }
bar() {
return this._bar;
}
baz(a, x) {
return "HELLO";
}
static ["computedname4"]() { }
static ["computedname5"](a) { }
static ["computedname6"](a) { return true; }
static staticMethod() {
var x = 1 + 2;
return x;
}
static foo(a) { }
static bar(a) { return 1; }
}
|