DefinitelyTyped/async-polling/index.d.ts
Andy d2150a603f Even more 2.0 (#12503)
* Always use forceConsistentCasingInFileNames

* Rename files

* Convert more packages to `types-2.0` style
2016-11-05 13:34:11 -07:00

16 lines
609 B
TypeScript

// Type definitions for AsyncPolling
// Project: https://github.com/cGuille/async-polling
// Definitions by: Zlatko Andonovski <https://github.com/Goldsmith42/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace AsyncPolling {
export type EventName = "run"|"start"|"error"|"result"|"end"|"schedule"|"stop";
}
declare function AsyncPolling<Result>(pollingFunc: (end: (err?: Error, result?: Result) => any) => any, delay: number): {
run: () => any;
stop: () => any;
on: (eventName: AsyncPolling.EventName, listener: Function) => any;
}
export = AsyncPolling;