This repository has been archived on 2024-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
keksAccountGUI/node_modulesOLD/map-age-cleaner/dist/index.d.ts

21 lines
713 B
TypeScript
Raw Normal View History

2019-08-11 18:48:02 +00:00
interface Entry {
[key: string]: any;
}
interface MaxAgeEntry extends Entry {
maxAge: number;
}
/**
* Automatically cleanup the items in the provided `map`. The property of the expiration timestamp should be named `maxAge`.
*
* @param map - Map instance which should be cleaned up.
*/
export default function mapAgeCleaner<K = any, V extends MaxAgeEntry = MaxAgeEntry>(map: Map<K, V>): any;
/**
* Automatically cleanup the items in the provided `map`.
*
* @param map - Map instance which should be cleaned up.
* @param property - Name of the property which olds the expiry timestamp.
*/
export default function mapAgeCleaner<K = any, V = Entry>(map: Map<K, V>, property: string): any;
export {};