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

then

import { then } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/promise.ts";

An alias for Promise.then

@example
import { wrap, then } from "./promise.ts";
import { pipe } from "./fn.ts";

const result = await pipe(
  wrap(1),
  then(n => n + 1),
); // 2
function then<A, I>(fai: (a: A) => I | Promise<I>): (ua: Promise<A>) => Promise<I>;
§
then<A, I>(fai: (a: A) => I | Promise<I>): (ua: Promise<A>) => Promise<I>
[src]

§Type Parameters

§Parameters

§
fai: (a: A) => I | Promise<I>
[src]

§Return Type

§
(ua: Promise<A>) => Promise<I>
[src]