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

fromPromise

import { fromPromise } from "https://raw.githubusercontent.com/surma/observables-with-streams/28c55be6d855780c677fd1f4ba975f4d3144891d/src/index.ts";

Creates an observable from a promise, that emits exactly one value when the promise resolves.

function fromPromise<T>(p: Promise<T>): Observable<T>;
§
fromPromise<T>(p: Promise<T>): Observable<T>
[src]

§Type Parameters

§Parameters

§
p: Promise<T>
[src]

Promise that will be awaited.

§Return Type

§

New observable that emits the value the promise settles with.