TypeScript/tests/baselines/reference/computedPropertyNames40_ES5.js
Cyrus Najmabadi d928baf9d4 Merge branch 'master' into multiLineEmit2
Conflicts:
	src/compiler/emitter.ts
	tests/baselines/reference/computedPropertyNames32_ES5.js
	tests/baselines/reference/computedPropertyNames33_ES6.js
	tests/baselines/reference/computedPropertyNames34_ES6.js
	tests/baselines/reference/computedPropertyNames35_ES5.js
	tests/baselines/reference/privateIndexer2.js
2015-02-21 14:37:54 -08:00

31 lines
623 B
JavaScript

//// [computedPropertyNames40_ES5.ts]
class Foo { x }
class Foo2 { x; y }
class C {
[s: string]: () => Foo2;
// Computed properties
[""]() { return new Foo }
[""]() { return new Foo2 }
}
//// [computedPropertyNames40_ES5.js]
var Foo = (function () {
function Foo() {
}
return Foo;
})();
var Foo2 = (function () {
function Foo2() {
}
return Foo2;
})();
var C = (function () {
function C() {
}
// Computed properties
C.prototype[""] = function () { return new Foo; };
C.prototype[""] = function () { return new Foo2; };
return C;
})();