mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
16 lines
608 B
TypeScript
16 lines
608 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; |