necessary-utils-core
Version:
Necessary utils for the NodeJS projects.
16 lines (15 loc) • 490 B
TypeScript
export declare class DictionaryItem<K, V> {
Key: K;
Value: V;
constructor(key: K, value: V);
toJSON(): string;
}
export default class Dictionary<K, V> extends Array<DictionaryItem<K, V>> {
constructor();
add(key: K, value: V): number;
getValue(objectKey: K): V | undefined;
setValue(key: K, newValue: V): void;
static fromObject<T extends Object>(obj: T): Dictionary<string, any>;
toValueList(): Array<V>;
toKeyList(): Array<K>;
}