"Fossies" - the Fresh Open Source Software Archive

Member "node-v12.18.4-win-x86/node_modules/npm/node_modules/map-age-cleaner/dist/index.d.ts" (18 Feb 2020, 733 Bytes) of package /windows/www/node-v12.18.4-win-x86.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) TypeScript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 interface Entry {
    2     [key: string]: any;
    3 }
    4 interface MaxAgeEntry extends Entry {
    5     maxAge: number;
    6 }
    7 /**
    8  * Automatically cleanup the items in the provided `map`. The property of the expiration timestamp should be named `maxAge`.
    9  *
   10  * @param map - Map instance which should be cleaned up.
   11  */
   12 export default function mapAgeCleaner<K = any, V extends MaxAgeEntry = MaxAgeEntry>(map: Map<K, V>): any;
   13 /**
   14  * Automatically cleanup the items in the provided `map`.
   15  *
   16  * @param map - Map instance which should be cleaned up.
   17  * @param property - Name of the property which olds the expiry timestamp.
   18  */
   19 export default function mapAgeCleaner<K = any, V = Entry>(map: Map<K, V>, property: string): any;
   20 export {};