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
If you register an event handler on a specific event (i.e. Engine.on("my-event", ...)), the first argument of the method will be the params of the Event definition (type: Record<string, any>), not the Event object itself.
I'm not sure if this only the case for specific events or more generally the EventHandler:
I can't speak for the developer (wherever they are), but I think this is intentional, because if you add a listener for a specific 'known' event, the only data you wouldn't know is the event's params. I could be wildly wrong, but it does feel like it should be that way
If you register an event handler on a specific event (i.e.
Engine.on("my-event", ...)
), the first argument of the method will be theparams
of theEvent
definition (type:Record<string, any>
), not theEvent
object itself.I'm not sure if this only the case for specific events or more generally the
EventHandler
:json-rules-engine/types/index.d.ts
Lines 106 to 110 in 90272d6
The text was updated successfully, but these errors were encountered: