UNPKG

decova-dotnet-developer

Version:

This package provides fundumentals that a .net developer may miss while working with Typescript, whether they are missing functinalities or funcionalities provided in a non-elegant design in javascript. Bad naming, bad design of optional parameters, non-c

26 lines 984 B
import { List } from "./List"; export declare class KeyValuePair<TKey, TValue> { Key: TKey; Value: TValue; constructor(key: TKey, value: TValue); } declare type actionOnKeyValue<TKey, TValue> = (kv: KeyValuePair<TKey, TValue>) => void; export declare class Dictionary<TKey, TValue> { private _map; Add(key: TKey, value: TValue): void; Ensure(key: TKey, value: TValue, overwriteIfExising?: boolean): boolean; Get(key: TKey): TValue | undefined; Set(key: TKey, value: TValue): void; UpdateOnlyIfAny(key: TKey, value: TValue): boolean; Remove(key: TKey): void; EnsureRemoved(key: TKey): void; get Keys(): List<TKey>; get Values(): List<TValue>; Clear(): void; Foreach(func: actionOnKeyValue<TKey, TValue>): void; Contains(key: TKey): boolean; get Count(): number; static FromObjectProps<TValue>(obj: object): Dictionary<string, TValue>; } export {}; //# sourceMappingURL=Dictionary.d.ts.map