CacheControl / CacheControl/json-rules-engine
Type of `Engine.on()` is wrong
Open
- Dominant language
- JavaScript
- Stars
- 3.1k
- Forks
- 507
- PR merge metrics
- No merged PRs in 30d
Description
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`), not the `Event` object itself.
I'm not sure if this only the case for specific events or more generally the `EventHandler`:
https://github.com/CacheControl/json-rules-engine/blob/90272d61ed7bea8b7d4000305511e932490d2e2e/types/index.d.ts#L106-L110
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.