Parameters
- g: Generator<T, TReturn, TNext>
Optional
maxTimePerTick: numberOptional
whileConditions: boolean
Returns Promise<{ return: TReturn; yield: T[] }>
A promise that resolves with an object containing the yielded values and the return value of the generator.
Asynchronously completes a generator function, yielding values and respecting a maximum time per tick.