# Interface AsyncGenerator<T, TReturn, TNext>

Describes an AsyncIterator produced by the runtime that inherits from the intrinsic `AsyncIterator.prototype`.

#### Type Parameters

- #### T = unknown

- #### TReturn = any

- #### TNext = any

#### Hierarchy

- AsyncIteratorObject<T, TReturn, TNext>
  - AsyncGenerator

#####
Index

### Methods

[asyncIterator]
next
return
throw

## Methods

### [asyncIterator]

- [asyncIterator](): AsyncGenerator<T, TReturn, TNext>

- #### Returns AsyncGenerator<T, TReturn, TNext>

  Overrides AsyncIteratorObject.[asyncIterator]

### next

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

- #### Parameters

  - ##### `Rest` ...__namedParameters: [] | [TNext]

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

  Overrides AsyncIteratorObject.next

### return

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

- #### Parameters

  - ##### value: TReturn | PromiseLike<TReturn>

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

  Overrides AsyncIteratorObject.return

### throw

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

- #### Parameters

  - ##### e: any

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

  Overrides AsyncIteratorObject.throw

Generated using TypeDoc