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
In this case I was looking at having middleware add a requestId and a startTime to the action when it is received by the middleware then sent over the websocket, but I may use a map on requestId as a key instead to keep the actions read only.
When I try to set a field on
meta
, TypeScript complains that the property does not exist.For example:
The current definition of
meta
inAction<P>
looks like this:If I change it as follows, then I can place any fields into
meta
with no errors.Of course this means
meta
is not type-safe, but it's no worse than the current definition.Another alternative would be to provide a type parameter for
meta
(e.g.,Action<P,M>
), but that might be a bit of overkill for a field likemeta
.Any interest in either of these changes?
The text was updated successfully, but these errors were encountered: