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