As pointed out by @solid-vovabeloded:
Currently if we use HydratedSubject with a primitive type, custom persist and hydrate callbacks won't be invoked, or used at all:

The idea is to change the check order in the above method to use the custom callbacks, if they were provided, and then fall back to standard handling.
As pointed out by @solid-vovabeloded:

Currently if we use
HydratedSubjectwith a primitive type, custompersistandhydratecallbacks won't be invoked, or used at all:The idea is to change the check order in the above method to use the custom callbacks, if they were provided, and then fall back to standard handling.