We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First, thanks for this helpful package @binier ! I used to manually declare onX(…) events to enforce typed events until I found it.
onX(…)
One thing I miss is a plain interface definition which I can inherit.
export interface ITypedEmitter<L extends ListenerSignature<L> = DefaultListener> { addListener<U extends keyof L>( event: U, listener: L[U] ): this; prependListener<U extends keyof L>( event: U, listener: L[U] ): this; // etc. } export interface MyInterfaceWithEvents extends ITypedEmitter<MyEvents> { // … }
so users of the interface can also rely on typed events, not only users of the instance.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
First, thanks for this helpful package @binier ! I used to manually declare
onX(…)
events to enforce typed events until I found it.One thing I miss is a plain interface definition which I can inherit.
so users of the interface can also rely on typed events, not only users of the instance.
The text was updated successfully, but these errors were encountered: