The generator function to complete.
OptionalmaxTimePerTick: numberThe maximum time (in milliseconds) to spend on each tick before yielding control back to the system. Defaults to 1500.
OptionalwhileConditions: string | number | boolean | FunctionThe condition to continue running the generator. Can be a boolean, number, string, or function. Defaults to true.
A promise that resolves with the final yielded value and the return value of the generator.
Asynchronously completes a generator function, yielding control back to the system if the execution time exceeds a specified limit per tick.