The return method should accept a thenable which resolves to the final value as well as a final value (see spec). The typescript AsyncIterator interface requires return to be passed PromiseLike<TReturn> | TReturn. We should handle the case where a PromiseLike is passed to return in code and update types.
The
return
method should accept a thenable which resolves to the final value as well as a final value (see spec). The typescriptAsyncIterator
interface requiresreturn
to be passedPromiseLike<TReturn> | TReturn
. We should handle the case where a PromiseLike is passed toreturn
in code and update types.