Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

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>;
§
wrap<A>(a: A | PromiseLike<A>): Promise<A>
[src]

§Type Parameters

§Parameters

§
a: A | PromiseLike<A>
[src]

§Return Type

§
Promise<A>
[src]