/** * Returns a new promise that rejects with a 500 ForageError if the provided promise * does not resolve or reject within the given timeframe. * * @param promise the promise that we're attempting to resolve * @param deadlineMs the deadline/timeout in milliseconds * @param event the name of the event associated with the promise * @returns */ export declare const promiseTimeout: (promise: Promise, deadlineMs: number, event: string) => Promise; /** * @description Logs an error if the promise takes longer than `deadlineMs` to resolve * or reject. * * @param promise - the promise that we're attempting to resolve * @param deadlineMs - the deadline/timeout in milliseconds * @param event - the name of the event associated with the promise * @returns the promise that we're attempting to resolve */ export declare const promiseTimeoutLogWarning: (promise: Promise, deadlineMs: number, event: string) => Promise; /** * Returns a new promise that rejects with a 504 ForageError if the provided promise * does not resolve or reject within the given timeframe. Logs an error if the promise * takes longer than `warningTimeoutMs` to resolve or reject. * * @description equivalent to wrapping a promise in a promiseTimeout and promiseTimeoutLogWarning * @param promise - the promise that we're attempting to resolve * @param options.warningTimeoutMs - the warning timeout in milliseconds for the promise * @param options.fatalDeadlineMs - the fatal timeout in milliseconds for the promise * @param options.event - the name of the event associated with the promise * @returns the promise that we're attempting to resolve */ export declare const promiseTimeoutWithLogWarning: (promise: Promise, options: { warningTimeoutMs: number; fatalDeadlineMs: number; event: string; }) => Promise;