Class FunctionIterator<TFunc, TSentinel>

Creates a iterator from any function. func will be called once per next() call and will stop once the value of sentinel (default: undefined) is returned from func. Behaves similarly to a generator function, except without the use of yield statements.

Type Parameters

  • TFunc extends ((...args: any[]) => any)
  • TSentinel = undefined

Constructors

Properties

Methods

Constructors

Properties

func: TFunc
sentinel?: TSentinel

Methods