Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/stream_observables/sources/from-async-function.ts>fromAsyncFunction

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

Creates an observable from an asynchronous function. The observable emits exactly one value when once the function returns.

Parameters

f: () => Promise<T>

Async function that will be awaited.

Returns

New observable that emits the value the async function returns.