保誠-保戶業務員媒合平台
tomasysh
2022-05-25 43d0eed31f4b2a59e23c06ceba3616aac3f549f6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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 {};