vacuumlabs/babel-plugin-extensible-destructuring

Not work: destruct function arguments with immutable objects

erictsangx opened this issue · 3 comments

function read({a, b, c}) {
    console.info(a) //ppp
    console.info(b) //11
}
read({a: "ppp", b: 11})
function read({a, b, c}) {
    console.info(a) //undefined
    console.info(b) //undefined
}
read(fromJS({a: "ppp", b: 11}))

Now I have to destruct immutable objects inside the functions and it works prefectly:

function read(obj) {
   const {a,b} = obj
 ...
}

Whyyy!!!? ....
:D no seriously why this hasn't been fixed yet?

@hendrul maybe because you haven't submitted your pull request yet?