A Coroutine is either a
Generator<undefined, T, unknown>
or a
Generator function
that returns such a Generator. The union is a convenience that makes it
possible to pass in Generator function literals where a Generator instance
would be expected.
Type Parameters
T
The return type of the generator. Coroutines always yield undefined.
A Coroutine is either a Generator<undefined, T, unknown> or a Generator function that returns such a Generator. The union is a convenience that makes it possible to pass in Generator function literals where a Generator instance would be expected.