import { Out } from "./Out"; import { Enumerator } from "./Enumerator"; /** Dictionary Hash List * @class Dictionary * @extends {Array} */ export declare class Dictionary extends Map { private hash; constructor(dict?: Iterable | null | undefined); /** * Add a key to the Dictionary. */ Add(Key: T, Value: A): boolean; IteratorList(): Generator<{ Key: T; Value: A; }, void, unknown>; /** * Attempt to add a key. * Will not error if key exists. */ TryAdd(Key: T, Value: A): boolean; /** * Clear the Dictionary. */ Clear(): void; /** * Check if a key exists. */ ContainsKey(Key: T): boolean; /** * Check how many items match a predicate. */ CheckCount(predicate: (value: any, index: number, array: any[]) => unknown): number; /** * Replace the value in a key */ Replace(Key: T, Value: A): boolean; /** * Check if the dictionary contains a Value */ ContainsValue(Value: A): boolean; /** * Remove a value by Key */ Remove(Key: T, out?: Out): boolean; /** * Try and remove a value */ TryRemove(Key: T, out?: Out): boolean; /** * The Item Count */ get Count(): number; /** * Get an item. */ Get(Key: T, out?: Out): boolean; /** * Create a dictionary from an object */ static ToDictionary(obj: { [prop: string]: any; [prop: number]: any; }): Dictionary; /** * Create a dictionary from an object containing object constructor */ static ToDictionaryAs(obj: { [prop: string]: any; [prop: number]: any; }, constructor: any): Dictionary; /** * Add an item or update a matching item */ AddOrUpdate(Key: T, Value: A, ReplaceFunc: (Key: T, OldValue: A) => A): A; /** * Try and get a value */ TryGetValue(Key: T, Out?: Out): boolean; /** * Get a value and return it */ ReturnValue(Key: T, out?: Out): A; /** * Get the struct enumerator. * Only use this if you know what you're doing. */ GetEnumerator(): Enumerator>; toJSON(): { [prop: string]: A; }; } //# sourceMappingURL=Dictionary.d.ts.map