import { Rhodium } from "./Rhodium.mts"; import type { RhodiumSettledResult } from "./settled.mts"; import type { Errored } from "./terminology.mts"; /** * The return type of a cancelled finalized {@link Rhodium}. */ export interface RhodiumCancelledResult { status: "cancelled"; value?: never; reason?: E; } /** * The return type of any settled {@link Rhodium}. */ export type RhodiumFinalizedResult = RhodiumSettledResult | RhodiumCancelledResult; /** * Creates a Rhodium that is resolved when the provided value finalizes. * Finalization is a superset of both {@link Rhodium.cancel cancellation} and {@link RhodiumSettledResult settlement}. * In case of cancellation, returned Rhodium will only resolve when all {@linkcode Rhodium.finally} callbacks have been executed. * * The returned Rhodium does not propagate cancellation upwards. */ export declare function oneFinalized(rhodium: Rhodium): Rhodium, never>; type AllFinalized[]> = { -readonly [P in keyof Ps]: RhodiumFinalizedResult, Errored>; }; /** * Creates a Rhodium that is * resolved with an array of results when all of the provided values {@link oneFinalized finalize}. * * The returned Rhodium does not propagate cancellation upwards. */ export declare function allFinalized[]>(values: Ps): Rhodium, never>; export {};