UNPKG

@rudderstack/integrations-lib

Version:

A comprehensive TypeScript library providing shared utilities, SDKs, and tools for RudderStack integrations and destinations.

26 lines 997 B
import { ClusterManagerOptions } from './types'; /** * Utility functions for ClusterManager */ /** * Creates a promise that resolves after the specified timeout */ export declare function delay(ms: number): Promise<void>; /** * Creates a promise that rejects after the specified timeout */ export declare function timeout<T>(promise: Promise<T>, ms: number, errorMessage?: string): Promise<T>; /** * Safely executes an async function with error handling */ export declare function safeExecute<T>(fn: () => T | Promise<T>, errorMessage: string): Promise<T | undefined>; /** * Validates ClusterManagerOptions and provides defaults * * @param options - User-provided options * @returns Required options with defaults applied * * @see {@link https://nodejs.org/docs/latest/api/cluster.html#clustersettings Node.js Cluster Settings} */ export declare function validateAndDefaultOptions(options: ClusterManagerOptions): Required<ClusterManagerOptions>; //# sourceMappingURL=utils.d.ts.map