mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
* feat(long-timeout): new type definition * fix(long-timeout): remove export as namespace long-timeout does not have a UMD wrapper.
29 lines
796 B
TypeScript
29 lines
796 B
TypeScript
// Type definitions for long-timeout 0.1
|
|
// Project: https://github.com/tellnes/long-timeout
|
|
// Definitions by: Matthias Kunnen <https://github.com/MatthiasKunnen>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export type Listener = (...args: any[]) => void;
|
|
|
|
export class Timeout {
|
|
after: number;
|
|
close: () => void;
|
|
listener: Listener;
|
|
ref: () => void;
|
|
start: () => void;
|
|
unref: () => void;
|
|
unreffed: boolean;
|
|
|
|
constructor(listener: Listener, ms: number);
|
|
}
|
|
|
|
export type Interval = Timeout;
|
|
|
|
export function clearInterval(timer: Interval): void;
|
|
|
|
export function clearTimeout(timer: Timeout): void;
|
|
|
|
export function setInterval(listener: Listener, ms: number): Interval;
|
|
|
|
export function setTimeout(listener: Listener, ms: number): Timeout;
|