import type { EngineInternals } from './internals.ts'; export type CancelHandler = () => Promise | void; export declare function registerCancelHandler(internals: EngineInternals, workflowId: string, handler: CancelHandler): () => void; export declare function createCancelHandlerRegistration(internals: EngineInternals, workflowId: string): (handler: CancelHandler) => () => void; export declare function resetCancelHandlers(internals: EngineInternals, workflowId: string): void; export declare function takeCancelHandlers(internals: EngineInternals, workflowId: string): CancelHandler[];