I have an object that contains symbols as keys. How do I do destructuring assignment in this case?
let symbol = Symbol()
let obj = {[symbol]: ''}
let { /* how do I create a variable here, that holds the value of [symbol] property? */ } = obj
I need to know if this possible, I do know the obvious and simple workarounds, but that's not what I am asking.
UPD. Funny enough I knew how to do that but typescript produced errors, and I thought I did something wrong in JS. Here's a fix for typescript users.