© 2026 Hedgehog Software, LLC
let x = 'b'; let y = { [x]: 6 }; console.log(y);
b
6
let x: string = 'b'; let y: {b: number} = { [x]: 6, }; console.log(y);
Property 'b' is missing in type '{ [x]: number; }' but required in type '{ b: number; }'.
[x]
@ts-ignore