UNPKG

together-ai-sdk

Version:

A typescript SDK for the Together AI API

10 lines (9 loc) 434 B
/** * Waits for the timeout to expire, then runs the callback * Use this when needing to await the timeout: * `await asyncTimeout(func, 1000)` * @param timeout - number of milliseconds to wait * @param callback - the function to execute when the timeout is finished. * Acts as a blocking sleep function if no callback is provided */ export declare const asyncTimeout: (timeout: number, callback?: () => void) => Promise<void>;