RSX Code Reference
    Preparing search index...

    Interface Iterable<T>

    The Iterable interface defines the basic interface for iterable objects in RSX.

    The Iterable is an immutable array type that can be used to iterate over a collection of items. It provides a set of methods for accessing and manipulating the items in the collection, such as forEach, map, filter, count, find, findIndex, some, every, reduce, and reduceRight.

    interface Iterable<T> {
        back: T;
        front: T;
        count(lambda: (type: T) => boolean): number;
        toArray(): T[];
    }

    Type Parameters

    • T

    Hierarchy

    • Iterable<T>
    • Pick<
          T[],
          | "forEach"
          | "map"
          | "filter"
          | "count"
          | "find"
          | "findIndex"
          | "some"
          | "every"
          | "reduce"
          | "reduceRight"
          | "front"
          | "back",
      >
      • Iterable
    Index
    back: T
    front: T
    • Counts the numer of elements that match the lambda expression.

      Parameters

      • lambda: (type: T) => boolean

      Returns number

    • Converts the iterable data into an array.

      Returns T[]

      The backing store of the iterable can be an array, in those cases the implementation could return the internal array directly.