You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I deserialize an object using the JsonSerializer the type of the array change. When displaying the constructor.name of the array, the name become "bound Array".
And then overriding the push() method for example doesn't work:
const MYTYPE_SERIALIZER = new JsonSerializer(MyType)
console.log(data.myArray.constructor.name); // It display "Array"
let myType = MYTYPE_SERIALIZER.deserialize(data, true);
console.log(myType .myArray.constructor.name); // It display "bound Array"
let myArray = myType.myArray;
myArray.push = function () {
console.log("Debug");
return Array.prototype.push.apply(this, arguments);
}
myArray.push("Something"); // The console.log("Debug") will not be called
The text was updated successfully, but these errors were encountered:
@ArrayMember fields values get replaced with a Proxy to detect changes. The library keeps track of mutations on a @model decorated class instance. To get a list of mutations you can do:
When I deserialize an object using the JsonSerializer the type of the array change. When displaying the constructor.name of the array, the name become "bound Array".
And then overriding the push() method for example doesn't work:
The text was updated successfully, but these errors were encountered: