/** * Capability passed to cleanup callbacks that may need to initiate disposal of * their owner. The request is deliberately non-blocking: cleanup must finish * before the owner's external disposal barrier can settle. */ export interface CleanupControl { /** * Start disposal of the callback's owner without waiting on the cleanup * callback that made the request. External `dispose()` callers still await * the complete teardown and receive its failures. */ requestDisposal(): void; } /** @internal */ export declare function createCleanupControl(startDisposal: () => Promise): CleanupControl; /** @internal */ export declare function createDeferred(): { promise: Promise; resolve: (value: T | PromiseLike) => void; reject: (reason?: unknown) => void; };