StoppingAcceptor<T>: ((this, element) => boolean)

Type Parameters

  • T

    Iterated elements type.

Type declaration

    • (this, element): boolean
    • A signature of a function accepting iterated elements and able to suspend or stop further iteration.

      When this function returns true, the iteration is suspended. I.e. the no more elements would be pushed to this function, but the iteration method ([PushIterator__symbol]) would return an iterator that can be used to resume iteration.

      When this function returns false, the iteration is stopped. I.e. the no more elements would be pushed to this function, and the iteration method ([PushIterator__symbol]) would return an empty iterator. I.e. the one with its isOver method always returning true.

      Parameters

      • this: void
      • element: T

        Iterated element.

      Returns boolean

      true to suspend iteration, or false to stop it.

Generated using TypeDoc