ReadonlyclosedResolves with a CloseReport once all upstream iterators and finalizers have finished. Never rejects, and awaiting it does not trigger cancellation.
Immediately requests cancellation without waiting for cleanup. Track teardown completion via closed.
Optionalreason: unknownStops the execution and waits for cleanup before resolving { done: true, value: undefined }. Rejects with the primary reason if the execution failed, including cleanup-only failure. After cancellation, resolves even if cleanup fails; inspect closed for suppressed errors.
Optionalvalue: unknownRequests failure without forwarding the throw into the upstream iterator and rejects immediately, without waiting for cleanup. Preserves an existing failure or cancellation reason; await closed for teardown completion.
Optionalerror: unknown
An
AsyncIterableIteratorwith explicit cancellation control and aclosedlifecycle promise.