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

fromAsyncFunction

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

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

function fromAsyncFunction<T>(f: () => Promise<T>): Observable<T>;
§
fromAsyncFunction<T>(f: () => Promise<T>): Observable<T>
[src]

§Type Parameters

§Parameters

§
f: () => Promise<T>
[src]

Async function that will be awaited.

§Return Type

§

New observable that emits the value the async function returns.