/** * @typedef {object} Cache * @property {function(string):*} get Gets value for key. * @property {function(string, *):*} set Sets value for key, returns the value. * @property {function(string):boolean} has Gets if key exists or not. * @property {function(string):undefined} remove Removes value for key. * @property {function():undefined} empty Empties the cache. */ /** * Creates a cache instance. * * @returns {Cache} The created cache instance. */ export default function createCache(): Cache; export type Cache = { /** * Gets value for key. */ get: (arg0: string) => any; /** * Sets value for key, returns the value. */ set: (arg0: string, arg1: any) => any; /** * Gets if key exists or not. */ has: (arg0: string) => boolean; /** * Removes value for key. */ remove: (arg0: string) => undefined; /** * Empties the cache. */ empty: () => undefined; };