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

x/ayonli_jsext/external/thenable-generator/index.ts>create

A JavaScript extension package for building strong and modern applications.
Latest
function create
import { create } from "https://deno.land/x/ayonli_jsext@v0.9.72/external/thenable-generator/index.ts";

Creates a generator that implements the PromiseLike interface so that it can be awaited in async contexts.

Type Parameters

optional
T = unknown
optional
TReturn = any
optional
TNext = unknown
optional
TArgs extends any[] = any[]

Parameters

fn: (...args: TArgs) => AsyncGenerator<T, TReturn, TNext> | AsyncIterable<T> | Promise<T>

Type Parameters

optional
T = unknown
optional
TReturn = any
optional
TNext = unknown
optional
TArgs extends any[] = any[]

Parameters

fn: (...args: TArgs) => Generator<T, TReturn, TNext> | Iterable<T> | T