We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
TypeScript Version: 2.2.2
Code
const a = "a"; const b = "b"; const x = { [a]: "aaa", [b]: 123, }; const y = { a: "aaa", b: 123, };
Expected behavior: both x, y have type {a: string, b: number}
x
y
{a: string, b: number}
Actual behavior: x has type {[x: string]: string | number} y has type {a: string, b: number}
{[x: string]: string | number}