2015-02-04 02:43:31 +01:00
|
|
|
//// [computedPropertyNamesContextualType7_ES5.ts]
|
|
|
|
interface I<T> {
|
|
|
|
[s: number]: T;
|
|
|
|
}
|
|
|
|
|
|
|
|
declare function foo<T>(obj: I<T>): T
|
|
|
|
|
|
|
|
foo({
|
|
|
|
p: "",
|
|
|
|
0: () => { },
|
|
|
|
["hi" + "bye"]: true,
|
|
|
|
[0 + 1]: 0,
|
|
|
|
[+"hi"]: [0]
|
|
|
|
});
|
|
|
|
|
|
|
|
//// [computedPropertyNamesContextualType7_ES5.js]
|
2015-02-05 03:35:04 +01:00
|
|
|
foo((_a = {
|
2015-02-24 02:44:48 +01:00
|
|
|
p: "",
|
|
|
|
0: function () { }
|
|
|
|
},
|
|
|
|
_a["hi" + "bye"] = true,
|
|
|
|
_a[0 + 1] = 0,
|
|
|
|
_a[+"hi"] = [0],
|
|
|
|
_a
|
|
|
|
));
|
2015-02-05 03:35:04 +01:00
|
|
|
var _a;
|