Why this code produces an error Type 'symbol' cannot be used to index type '{ [x: string]: string; }'.
:
let symbol = Symbol()
let obj = { [symbol] : 'value'}
let { [symbol]: alias } = obj
// ^^^^^ the error is here
console.log(alias)
And most importantly, how do I fix this?