In afterchange hooks, doc is populated, previousDoc not #13120
llezhava
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone!
In afterchange hooks
doc
is populated to depth > 0, butpreviousDoc
is not populated.Akso, by default array of collection afterchange hook is: AfterChangeHook[] .
Since it's any and there is no documentation around it, I am not sure if doc will always be populated or not. Because of this I have to write type guards for each property and refetch again.
I think, that we shall get predictable types there, or see some documentation, which is describing it.
Or instead of any, we could infer there AfterChangeHook.
How do you think about approaching this issue? Id like to be able to configure it myself.
Beta Was this translation helpful? Give feedback.
All reactions