The issue is that, the .on function is defined as:
on: (ev: string, listener: IEventListener) => void;
and IEventListener is defined as:
export declare type IEventListener = () => void;
So this type dictates that no data should be passed through an event listener.
I know that the code is actually passing the data through these listeners, but this mis-typing prevents our Typescript project from compiling without explicitly ignoring typings for the .on function.
We are using the library with the Typescript types provided in this repository.
In your docs, you give this as an example of how to listen for errors:
The issue is that, the
.on
function is defined as:and
IEventListener
is defined as:So this type dictates that no data should be passed through an event listener.
I know that the code is actually passing the data through these listeners, but this mis-typing prevents our Typescript project from compiling without explicitly ignoring typings for the
.on
function.