UNPKG

dash-core

Version:

A foundational toolkit of types, collections, services, and architectural patterns designed to accelerate application development.

18 lines (17 loc) 862 B
import { TimeSpan } from 'dash-core'; /** Waits for the given `TimeSpan` before resolving. */ export declare function Wait(timeSpan: TimeSpan): Promise<void>; /** * Creates a recurring interval that calls the callback at the specified interval. * @param {() => void} callback - Function to call on each interval. * @param {TimeSpan} timeSpan - Duration between calls. * @returns {NodeJS.Timeout} Interval identifier. */ export declare function CreateInterval(callback: () => void, timeSpan: TimeSpan): NodeJS.Timeout; /** * Creates a timeout to call the callback after the specified delay. * @param {() => void} callback - Function to call after the delay. * @param {TimeSpan} timeSpan - Delay duration. * @returns {NodeJS.Timeout} Timeout identifier. */ export declare function CreateTimeout(callback: () => void, timeSpan: TimeSpan): NodeJS.Timeout;