Deferred
import type { Deferred } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/promise.ts";A Promise with the inner resolve function hoisted and attached to itself.
type Deferred<A> = Promise<A> & {
readonly resolve: (a: A | PromiseLike<A>) => void;
};