Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/stream_observables/mod.ts>fromPromise

A collection of observables built with ReadableStreams & friends.
Latest
function fromPromise
Re-export
import { fromPromise } from "https://deno.land/x/stream_observables@v1.3/mod.ts";

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

Parameters

p: Promise<T>

Promise that will be awaited.

Returns

New observable that emits the value the promise settles with.