CacheControl / CacheControl/json-rules-engine

Type of `Engine.on()` is wrong

Aperta
#295 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
3.1k
Fork
507
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.