The this pointer to bind the generator to, or the generator if the generator should be called unbound.
Optionalgenerator: (this: K) => Generator<T>
The generator.
OptionalonFinalize: () => void
An optional lambda that is called when the coroutine is finalized.
Coroutine
Creates a coroutine for the specified
generatorfunction that is bound to thetarget. The coroutine can be updated each frame by calling Coroutine#continue.