If the spread syntax is used with Realm.Objects, the result is a just empty object.
e.g.
const copied = { ...someRealmObject } // 'copied' will be empty, because spread syntax is not working
It should be possible to implement, with Typescript and Eslint, a rule that warns about spreading Realm.Objects.
So, it would be awesome, if there was an ESLint rule that gave an error if spreading an object that is extending Realm.Object. This ESLint rule would make realm-js more typesafe :)
This is, of course, is just a nice to have a feature 馃槃
Even nicer would be to fix the implementation so that it works with the spread operator 馃槣
@Frans-L Thanks for the suggestion.
Most helpful comment
Even nicer would be to fix the implementation so that it works with the spread operator 馃槣