/** * Default.ts * * @package vrkd/src/list * @author Fernando Salazar */ export type Storage = { [k: string]: V; }; /** * List class adds a CRUD wrapper to an object. */ export declare class List { /** * List storage */ private _storage; /** * Unique identifier for appending keyless values. */ private _count; /** * Class constructor */ constructor($storage?: Storage); /** * Assign a `$val` to a `$key` */ set($key: string, $val: V): void; /** * Get a value by `$key` */ get($key: string): V; /** * Does storage have `$key` */ has($key: string): boolean; /** * Add value to storage with no key provided. * It will generate and return the key it was assigned to. * * @param {V} $value to be added. * @return {int} The `$key` index of the value. */ append($value: V): string; /** * Remove value by `$key`. * * @param {string} $key * @return {void} */ remove($key: string): void; /** * Get all keys from storage */ keys(): string[]; /** * Get storage in a json string. * * @return {string} JSON string */ toJSON(): string; }