smartdelay/dist/index.d.ts

17 lines
438 B
TypeScript
Raw Normal View History

2017-01-16 13:54:08 +00:00
import 'typings-global';
2017-06-04 22:32:01 +00:00
/**
* delay something, works like setTimeout
* @param timeInMillisecond
* @param passOn
*/
2017-01-16 13:54:08 +00:00
export declare let delayFor: <T>(timeInMillisecond: number, passOn?: T) => Promise<T>;
2017-06-04 22:32:01 +00:00
export declare class Timeout<T> {
promise: Promise<T>;
private _deferred;
private _timeout;
private _cancelled;
constructor(timeInMillisecondArg: any, passOn?: T);
makeUnrefed(): void;
cancel(): void;
}