import type { Exit } from "../../Exit"; import * as T from "../../Task/_core"; import type { IO } from "../../Task/model"; import type { XPromise } from "../model"; import { completeWith } from "./completeWith"; /** * Exits the promise with the specified exit, which will be propagated to all * fibers waiting on the value of the promise. */ export const done = (e: Exit) => (promise: XPromise): IO => completeWith(T.done(e))(promise);