Files
DefinitelyTyped/async-polling/async-polling.d.ts
Goldsmith42 7dbdbc0187 Added async-polling definition (#11827)
* Added definition for async-polling

* async-polling tests with noImplicitAny
2016-10-07 12:48:58 -07:00

18 lines
662 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 module "async-polling" {
module AsyncPolling {
export type EventName = "run"|"start"|"error"|"result"|"end"|"schedule"|"stop";
}
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;
}