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
15 lines
340 B
JavaScript
15 lines
340 B
JavaScript
//// [computedPropertyNamesContextualType3_ES6.ts]
|
|
interface I {
|
|
[s: string]: (x: string) => number;
|
|
}
|
|
|
|
var o: I = {
|
|
[+"foo"](y) { return y.length; },
|
|
[+"bar"]: y => y.length
|
|
}
|
|
|
|
//// [computedPropertyNamesContextualType3_ES6.js]
|
|
var o = {
|
|
[+"foo"](y) { return y.length; },
|
|
[+"bar"]: y => { return y.length; }
|
|
};
|