TypeScript/tests/baselines/reference/computedPropertyNamesContextualType6_ES5.js
Daniel Rosenwasser 5fc2ec701b Merge branch 'master' into thanksLua
Conflicts:
	src/compiler/emitter.ts
	tests/baselines/reference/FunctionPropertyAssignments5_es6.js
	tests/baselines/reference/computedPropertyNames9_ES6.js
	tests/baselines/reference/computedPropertyNamesDeclarationEmit3.js
	tests/baselines/reference/computedPropertyNamesDeclarationEmit4.js
	tests/baselines/reference/parserES5ComputedPropertyName3.js
	tests/baselines/reference/parserES5ComputedPropertyName4.js
2015-02-17 17:43:06 -08:00

26 lines
431 B
JavaScript

//// [computedPropertyNamesContextualType6_ES5.ts]
interface I<T> {
[s: string]: T;
}
declare function foo<T>(obj: I<T>): T
foo({
p: "",
0: () => { },
["hi" + "bye"]: true,
[0 + 1]: 0,
[+"hi"]: [0]
});
//// [computedPropertyNamesContextualType6_ES5.js]
foo((_a = {
p: "",
0: function () { }
},
_a["hi" + "bye"] = true,
_a[0 + 1] = 0,
_a[+"hi"] = [0],
_a
));
var _a;