Iterate<T>: ((this, accept?, mode?) => PushIterator<T>)

Type Parameters

  • T

    Iterated elements type.

Type declaration

    • (this, accept?, mode?): PushIterator<T>
    • A signature of function conforming to push iteration protocol.

      Used as PushIterable[PushIterator__symbol] method implementation when passed to makePushIterable function.

      Parameters

      • this: void
      • Optional accept: Acceptor<T>

        A function to push iterated elements to. Accepts iterated element as its only parameter. May return true to suspend iteration, or false to stop it.

      • Optional mode: PushIterationMode

        Optional iteration mode hint declaring what accept function shall do. Ignored without accept parameter.

      Returns PushIterator<T>

      A push iterator instance to continue iteration with. If accept returned false then further iteration won't be possible with returned iterator.

Generated using TypeDoc