Conflicts: tests/baselines/reference/computedPropertyNames11_ES5.js tests/baselines/reference/computedPropertyNames1_ES5.js tests/baselines/reference/computedPropertyNamesContextualType1_ES5.js tests/baselines/reference/computedPropertyNamesContextualType2_ES5.js tests/baselines/reference/computedPropertyNamesContextualType3_ES5.js tests/baselines/reference/computedPropertyNamesDeclarationEmit5_ES5.js
24 lines
478 B
JavaScript
24 lines
478 B
JavaScript
//// [computedPropertyNames34_ES5.ts]
|
|
function foo<T>() { return '' }
|
|
class C<T> {
|
|
static bar() {
|
|
var obj = {
|
|
[foo<T>()]() { }
|
|
};
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
//// [computedPropertyNames34_ES5.js]
|
|
function foo() { return ''; }
|
|
var C = (function () {
|
|
function C() {
|
|
}
|
|
C.bar = function () {
|
|
var obj = (_a = {}, _a[foo()] = function () { },
|
|
_a);
|
|
return 0;
|
|
var _a;
|
|
};
|
|
return C;
|
|
})();
|