Permalink
Cannot retrieve contributors at this time
20 lines (20 sloc)
713 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
codeql-action/node_modules/map-age-cleaner/dist/index.d.ts
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 {}; |