wrap
import { wrap } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/promise.ts";Create a Promise from a value A or another PromiseLike. This is essentially an alias of Promise.resolve.
@example
import { wrap } from "./promise.ts";
const result = await wrap(1); // 1
function wrap<A>(a: A | PromiseLike<A>): Promise<A>;