It appears that it does not ignore member functions, but in reality, member functions are not necessary to be included in the patch result, and patch also resets member functions.
export class ChildStore<R> {
/** we don't need patch this, but it will*/
private getRoot: () => R;
get $root() {
return this.getRoot();
}
constructor(root: R) {
this.getRoot = () => root;
}
}
It appears that it does not ignore member functions, but in reality, member functions are not necessary to be included in the patch result, and patch also resets member functions.
result:
I think we should check if the value is a function and filter it out.