UNPKG

@bigmi/core

Version:

TypeScript library for Bitcoin apps.

10 lines (9 loc) 380 B
import type { ErrorType } from '../errors/utils.js'; export type WithTimeoutErrorType = ErrorType; export declare function withTimeout<data>(fn: ({ signal, }: { signal: AbortController['signal'] | null; }) => Promise<data>, { errorInstance, timeout, signal, }: { errorInstance?: Error | undefined; timeout: number; signal?: boolean | undefined; }): Promise<data>;