Action
    Preparing search index...

    Interface IReadOnlyList<T>

    Represents a read-only collection of elements that can be accessed by index.

    interface IReadOnlyList<T> {
        Item: PropertyGet<number | Int32, JsType<T>>;
        get Count(): number;
        "[iterator]"(): Iterator<JsType<T>>;
        Cast<T1, T2>(this: T2, type: TypeRef<T1>): T1;
        TryCast<T1, T2>(this: T2, type: TypeRef<T1>): null | T1;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Properties

    Accessors

    Methods

    Properties

    Item: PropertyGet<number | Int32, JsType<T>>

    Gets the element at the specified index in the read-only list.

    The zero-based index of the element to get.

    The element at the specified index in the read-only list.

    Accessors

    • get Count(): number

      Gets the number of elements in the collection.

      Returns number

      The number of elements in the collection.

    Methods

    • Casts this object to the specified type. Throws error on failure.

      Type Parameters

      • T1

        The target type of the cast.

      • T2

        The type of the object to cast.

      Parameters

      Returns T1

    • Casts this object to the specified type. Returns null on failure.

      Type Parameters

      • T1

        The target type of the cast.

      • T2

        The type of the object to cast.

      Parameters

      Returns null | T1