5fc2ec701b
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
23 lines
389 B
JavaScript
23 lines
389 B
JavaScript
//// [computedPropertyNamesContextualType7_ES6.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_ES6.js]
|
|
foo({
|
|
p: "",
|
|
0: () => { },
|
|
["hi" + "bye"]: true,
|
|
[0 + 1]: 0,
|
|
[+"hi"]: [0]
|
|
});
|