ECMAScript excitement πŸ˜‰ Congrats to @rbuckton on advancing Extractors to Stage 2 at @TC39 today πŸŽ‰ const C(x, y) = subject; It allows you to run arbitrary code during destructuring. This permits validation and normalization of values. github.com/tc39/proposal-ext…

Oct 9, 2024 Β· 3:08 AM UTC

3
19
122
16,249
Sort replies: Relevant Recent Liked
@rbuckton would the below be possible with extractors? const x & { a } = something; β€” or β€” arr.map((fullObj & { propA }) => (…)) …or would this sort of destructuring rely on pattern matching, cc @drosenwasser @ljharb @mpcsh_ @rkirsling @tabatkins
2
2
555
The implementors are crying πŸ˜‚
3
268
I... don't like this. How is this better than const {x, y} = C(subject) And now there is a tuple randomly happening?
171