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
16 lines
396 B
JavaScript
16 lines
396 B
JavaScript
//// [computedPropertyNamesContextualType2_ES6.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_ES6.js]
|
|
var o = {
|
|
[+"foo"](y) { return y.length; },
|
|
[+"bar"]: y => { return y.length; }
|
|
};
|