Class Dictionary<TKey, TValue>

Type Parameters

  • TKey

  • TValue

Hierarchy

Implements

Constructors

Properties

#hashtable: {
    [hash: string]: KeyValuePair<TKey, TValue>;
}

Type declaration

isReadOnly: boolean = false

Gets a value indicating whether the ICollection is read-only.

Accessors

Methods

  • Returns true if any of the items match the predicate, otherwise false

    Parameters

    Returns boolean

    Example

    if (myEnumerable.any()) {
    // do something because the enumerable has elements
    }
    let myEnumerable = new ArrayEnumerable([1, 2, 3, 4]);
    if (myEnumerable.any((i) => i == 2)) {
    // the enumerable contains a '2'
    }
  • Copies the elements of the ICollection to an Array, starting at a particular Array index.

    Parameters

    • array: KeyValuePair<TKey, TValue>[]

      The one-dimensional Array that is the destination of the elements copied from ICollection. The Array must have zero-based indexing.

    • arrayIndex: number

      The zero-based index in array at which copying begins.

    Returns void

  • Iterates over the enumerable and performs the callback on each item. Return false to break.

    Parameters

    • callback: ((value, index) => boolean | void)
        • (value, index): boolean | void
        • Parameters

          Returns boolean | void

    Returns void

  • Parameters

    • key: TKey

    Returns {
        success: boolean;
        value?: TValue;
    }

    • success: boolean
    • Optional value?: TValue

Generated using TypeDoc