Closed arieldf closed 7 years ago
It should work, but I haven't tested.
Just checked that there is currently a check isMap
that uses Immutable.Iterable.isKeyed and Records should pass that:
var A = Immutable.Record({a:null})
Immutable.Iterable.isKeyed(new A({}))
> true
Please, feel free to improve this library submiting tests or patches!
Just checked, and it seems to work fine:
require('immutablediff')(new A({a:2}), new A({a:3})).toJS()
[{"op":"replace","path":"/a","value":3}]
@pedroteixeira I am using Immutable 4.0.0rc2 and this is not working. I will investigate - basically it replaces the whole structure
hmm. thanks, I was testing with 3.7.x - will try to have a look as well as soon as I can (prob. next week). feel free to submit patches or suggestions!
I will @pedroteixeira. isKeyed is moved from Iterable to Collection in 4.0 and that is definitely a breaking change.
Using immutable records seems not to be supported, or am I wrong?