interface Finalizer { label: string; run: () => void | Promise; } /** * Run every finalizer without allowing one of their failures to replace the operation's primary error. * * Error identity is preserved when possible: refusal codes and `instanceof` checks are part of callers' * control flow. Finalizer failures are attached and added to the primary message instead of wrapping it. */ export declare function runWithFinalizers(operation: () => Promise, finalizers: readonly Finalizer[]): Promise; /** True when a primary error retained a finalizer failure of the requested kind. */ export declare function hasFinalizerError(error: unknown, predicate: (value: unknown) => boolean): boolean; export {}; //# sourceMappingURL=finalization.d.ts.map