# Interface Iterator<T, TReturn, TNext>

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

#### Type Parameters

- T
- TReturn = any
- TNext = undefined

#### Hierarchy (view full)

- Iterator
  - IterableIterator

- Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:41

#####
Index

### Methods

next
return?
throw?

## Methods

### next

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

- #### Parameters

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

  #### Returns IteratorResult<T, TReturn>

  - Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:43

### `Optional` return

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

- #### Parameters

  - `Optional` value: TReturn

  #### Returns IteratorResult<T, TReturn>

  - Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:44

### `Optional` throw

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

- #### Parameters

  - `Optional` e: any

  #### Returns IteratorResult<T, TReturn>

  - Defined in node_modules/typescript/lib/lib.es2015.iterable.d.ts:45