2015-02-04 02:43:31 +01:00
|
|
|
//// [computedPropertyNamesContextualType2_ES5.ts]
|
|
|
|
interface I {
|
|
|
|
[s: string]: (x: any) => number; // Doesn't get hit
|
|
|
|
[s: number]: (x: string) => number;
|
|
|
|
}
|
|
|
|
|
|
|
|
var o: I = {
|
|
|
|
[+"foo"](y) { return y.length; },
|
|
|
|
[+"bar"]: y => y.length
|
|
|
|
}
|
|
|
|
|
|
|
|
//// [computedPropertyNamesContextualType2_ES5.js]
|
2015-02-24 02:44:48 +01:00
|
|
|
var o = (_a = {},
|
|
|
|
_a[+"foo"] = function (y) { return y.length; },
|
|
|
|
_a[+"bar"] = function (y) { return y.length; },
|
|
|
|
_a
|
|
|
|
);
|
2015-02-05 03:35:04 +01:00
|
|
|
var _a;
|