Closed sirisian closed 4 years ago
How to rename?
let {x: X} = {x: 1}
X // 1
let {(x: uint8): X} =
or let {x: (X: uint8)} =
?
@hax That's already in the proposal here: https://github.com/sirisian/ecmascript-types#destructuring-assignment-casting The first example you listed would be correct.
Added a new section. https://github.com/sirisian/ecmascript-types#object-rest-destructuring
https://github.com/tc39/proposal-object-rest-spread
Unsure at this point what would be expected. Example:
So would the user want to be able to do:
Probably? Good idea to understand the syntax and ensure it doesn't have edge cases.