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
It would be better to make observer and subject from observer.utils.ts to use generics instead of hard-coded types in their payload.
The current implementation provides an existing type IObserverDataPayload which is the mix of existing node data types that are then used by observers and subjects.
A possible better implementation would be to provide custom payload data types for nodes and edges and use them to create a shared payload that could be used to parametrize observers while retrieving data. It is still not perfect and requires a lot of type guards to be used but it is already much more future-proof.
The text was updated successfully, but these errors were encountered:
It would be better to make observer and subject from
observer.utils.ts
to use generics instead of hard-coded types in their payload.The current implementation provides an existing type
IObserverDataPayload
which is the mix of existing node data types that are then used by observers and subjects.A possible better implementation would be to provide custom payload data types for nodes and edges and use them to create a shared payload that could be used to parametrize observers while retrieving data. It is still not perfect and requires a lot of type guards to be used but it is already much more future-proof.
The text was updated successfully, but these errors were encountered: