import type { ContextCancellable } from '../types.js'; import { PromiseCancellable } from '@matrixai/async-cancellable'; type ContextRemaining = Omit; type ContextAndParameters> = keyof ContextRemaining extends never ? [Partial?, ...P] : [Partial & ContextRemaining, ...P]; declare function setupCancellable, R>(f: (ctx: C, ...params: P) => PromiseLike, lazy: boolean, ctx: Partial, args: P): PromiseCancellable; declare function cancellable, R>(f: (ctx: C, ...params: P) => PromiseLike, lazy?: boolean): (...params: ContextAndParameters) => PromiseCancellable; export default cancellable; export { setupCancellable };