UNPKG

axax

Version:

A library of async iterator extensions for JavaScript including ```map```, ```reduce```, ```filter```, ```flatMap```, ```pipe``` and [more](https://github.com/jamiemccrindle/axax/blob/master/docs/API.md#functions).

6 lines (5 loc) 280 B
export interface IEventSource<T> { addEventListener: (type: string, callback: (event: T) => void) => void; removeEventListener: (type: string, callback: any) => void; } export declare function fromEvent<T>(source: IEventSource<T>, type: string): AsyncIterableIterator<T>;