by the_imp · 2y ago · 0 comments
const Integer = {
[Symbol.customMatcher]: (value) => [Number.parseInt(value)]
}
const Integer(counter) = 42.56;
// counter === 42
[1] https://github.com/tc39/proposal-extractorsNo comments yet.