Open robmanganelly opened 6 months ago
UPDATE:
I was able to solve the problem by reimplementing the toJSON
method in my wrapper,
I'm posting this in case anyone else faces the same issue in the future.
export class MyWrapper{
#nativeIp: Address4 | Address 6;
toJSON(){
// define serialization logic here,
// avoiding circular deps, and do not expose bigints to be serialized.
return this.#nativeIp.correctForm();
}
}
The issue is still valid for the case you have no way to reimplement JSON.stringify
Dear @robmanganelly , thanks for posting this. Would it be possible for you to add a PR, or should some of us do it?
Hello. I have a PR ready. But I think I found another problem. It could be my own mistake though, so, please check the spec file I changed and look for comment on line 137
edit (could not push, don't have enough permissions)
@robmanganelly you need to fork this project and push your branch to the fork. Then GitHub will give you the possibility to create a PR.
done
Hi guys,
I'm using
ngrx/toolkit
only to make mySignalStore
available to Redux Dev Tools. Hence, the only method in use iswithDevTools
, and I am passing a string.My project is using:
When I started using
ip-address
to perform operations on IPs, I got the following error:and this is the offending function in toolkit
Is it a bug or is there something that can be done from my side to mitigate this before reaching toolkit ? My implementation wraps Address4 or Address6 (from
ip-address
) and creates instances of them that go into the state. Given my business logic, I do need the actual instance and not a simplified representation of it, so, sadly, this is not a solution.Thanks for the great job.