mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
25 lines
780 B
TypeScript
25 lines
780 B
TypeScript
// Type definitions for lolex 1.2.1
|
|
// Project: https://github.com/sinonjs/lolex
|
|
// Definitions by: Wim Looman <https://github.com/Nemo157>
|
|
// Definitions: https://github.com/borisyankov/DefinitelyTyped
|
|
|
|
declare module 'lolex' {
|
|
export interface Clock {
|
|
setTimeout(callback: () => any, timeout: number): number;
|
|
setInterval(callback: () => any, timeout: number): number;
|
|
setImmediate(callback: () => any): number;
|
|
|
|
clearTimeout(id: number): void;
|
|
clearInterval(id: number): void;
|
|
clearImmediate(id: number): void;
|
|
|
|
tick(ms: number): void;
|
|
uninstall(): void;
|
|
}
|
|
|
|
export function createClock(now?: number): Clock;
|
|
|
|
export function install(now?: number, toFake?: string[]): Clock;
|
|
export function install(context?: any, now?: number, toFake?: string[]): Clock;
|
|
}
|