smartdelay/dist/index.d.ts
2017-06-05 00:32:01 +02:00

17 lines
438 B
TypeScript

import 'typings-global';
/**
* delay something, works like setTimeout
* @param timeInMillisecond
* @param passOn
*/
export declare let delayFor: <T>(timeInMillisecond: number, passOn?: T) => Promise<T>;
export declare class Timeout<T> {
promise: Promise<T>;
private _deferred;
private _timeout;
private _cancelled;
constructor(timeInMillisecondArg: any, passOn?: T);
makeUnrefed(): void;
cancel(): void;
}