# Interface AsyncGenerator<T, TReturn, TNext>

interface AsyncGenerator<T, TReturn, TNext> {
next(...__namedParameters: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
return(value: TReturn | PromiseLike<TReturn>): Promise<IteratorResult<T, TReturn>>;
throw(e: any): Promise<IteratorResult<T, TReturn>>;
[asyncIterator](): AsyncGenerator<T, TReturn, TNext>;
[asyncDispose](): PromiseLike<void>;
[asyncDispose](): PromiseLike<void>;
}

#### Type Parameters

- T = unknown
- TReturn = any
- TNext = any

#### Hierarchy

- AsyncIteratorObject<T, TReturn, TNext>
  - AsyncGenerator

- Defined in node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts:21

#####
Index

### Methods

next
return
throw
[asyncIterator]
[asyncDispose]

##
Methods

### next

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

- #### Parameters

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

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

  Overrides AsyncIteratorObject.next

  - Defined in node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts:23

### return

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

- #### Parameters

  - value: TReturn | PromiseLike<TReturn>

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

  Overrides AsyncIteratorObject.return

  - Defined in node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts:24

### throw

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

- #### Parameters

  - e: any

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

  Overrides AsyncIteratorObject.throw

  - Defined in node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts:25

### [asyncIterator]

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

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

  Overrides AsyncIteratorObject.[asyncIterator]

  - Defined in node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts:26

### [asyncDispose]

- [asyncDispose](): PromiseLike<void>

- #### Returns PromiseLike<void>

  Inherited from AsyncIteratorObject.[asyncDispose]

  - Defined in node_modules/typescript/lib/lib.esnext.disposable.d.ts:40
- [asyncDispose](): PromiseLike<void>

- #### Returns PromiseLike<void>

  Inherited from AsyncIteratorObject.[asyncDispose]

  - Defined in node_modules/@types/node/globals.d.ts:191