/** Attempt every independent cleanup and preserve each failure. */ export function closeVerifierResources( tasks: readonly (() => void | Promise)[], ): Promise; /** Finish one operation and its cleanup without losing either failure. */ export function withVerifierCleanup( operation: () => T | Promise, cleanupTasks: readonly (() => void | Promise)[], ): Promise; /** * A cleanup task that releases one resource only after every cleanup that may * still use it has succeeded; otherwise the resource is retained and reported. */ export function releaseAfter( dependents: readonly (() => void | Promise)[], release: () => void | Promise, retained: string, ): () => Promise;