Action
    Preparing search index...

    Represents a collection of objects that can be individually accessed by index.

    interface IList<T> {
        Item: PropertyGet<number | Int32, JsType<T>> & PropertySet<
            number
            | Int32,
            T | JsType<T>,
        >;
        get Count(): number;
        get IsReadOnly(): boolean;
        "[iterator]"(): Iterator<JsType<T>>;
        Add(item: T | JsType<T>): void;
        Cast<T1, T2>(this: T2, type: TypeRef<T1>): T1;
        Clear(): void;
        Contains(item: T | JsType<T>): boolean;
        IndexOf(item: T | JsType<T>): number;
        Insert(index: number | Int32, item: T | JsType<T>): void;
        Remove(item: T | JsType<T>): boolean;
        RemoveAt(index: number | Int32): void;
        TryCast<T1, T2>(this: T2, type: TypeRef<T1>): null | T1;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Properties

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

    Gets or sets the element at the specified index.

    The zero-based index of the element to get or set.

    The element at the specified index.

    Accessors

    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