Represents a nongeneric collection of key/value pairs.

interface IDictionary {
    Item: PropertyGet<any, unknown> & PropertySet<any, any>;
    get Count(): number;
    get IsFixedSize(): boolean;
    get IsReadOnly(): boolean;
    get Keys(): System.Collections.ICollection;
    get Values(): System.Collections.ICollection;
    Add(key: any, value: any): void;
    Add(key: any, value: any): void;
    Cast<T1, T2>(this: T2, type: TypeRef<T1>): T1;
    Clear(): void;
    Contains(key: any): boolean;
    Contains(key: any): boolean;
    Remove(key: any): void;
    Remove(key: any): void;
    TryCast<T1, T2>(this: T2, type: TypeRef<T1>): null | T1;
    [iterator](): Iterator<unknown, any, undefined>;
}

Hierarchy (view full)

Properties

Item: PropertyGet<any, unknown> & PropertySet<any, any>

Gets or sets the element with the specified key.

The key of the element to get or set.

The element with the specified key, or null if the key does not exist.

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

  • Removes the element with the specified key from the System.Collections.IDictionary object.

    Parameters

    • key: any

      The key of the element to remove.

    Returns void

  • Removes the element with the specified key from the System.Collections.IDictionary object.

    Parameters

    • key: any

      The key of the element to remove.

    Returns void

  • 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

  • Returns Iterator<unknown, any, undefined>