# Interface AsyncIterator<T, TReturn, TNext>

interface AsyncIterator<T, TReturn, TNext> {
next(...args): Promise<IteratorResult<T, TReturn>>;
return?(value?): Promise<IteratorResult<T, TReturn>>;
throw?(e?): Promise<IteratorResult<T, TReturn>>;
}

#### Type Parameters

- T
- TReturn = any
- TNext = undefined

#### Hierarchy (view full)

- AsyncIterator
  - AsyncIterableIterator
  - AsyncGenerator

- Defined in node_modules/typescript/lib/lib.es2018.asynciterable.d.ts:30

#####
Index

### Methods

next
return?
throw?

## Methods

### next

- next(...args): Promise<IteratorResult<T, TReturn>>

- #### Parameters

  - `Rest` ...args: [] | [TNext]

  #### Returns Promise<IteratorResult<T, TReturn>>

  - Defined in node_modules/typescript/lib/lib.es2018.asynciterable.d.ts:32

### `Optional` return

- return(value?): Promise<IteratorResult<T, TReturn>>

- #### Parameters

  - `Optional` value: TReturn | PromiseLike<TReturn>

  #### Returns Promise<IteratorResult<T, TReturn>>

  - Defined in node_modules/typescript/lib/lib.es2018.asynciterable.d.ts:33

### `Optional` throw

- throw(e?): Promise<IteratorResult<T, TReturn>>

- #### Parameters

  - `Optional` e: any

  #### Returns Promise<IteratorResult<T, TReturn>>

  - Defined in node_modules/typescript/lib/lib.es2018.asynciterable.d.ts:34