1 | import type { ESLintSettings } from "./types";
|
2 |
|
3 | export type CacheKey = unknown;
|
4 | export type CacheObject = {
|
5 | result: unknown;
|
6 | lastSeen: ReturnType<typeof process.hrtime>;
|
7 | };
|
8 |
|
9 | declare class ModuleCache {
|
10 | map: Map<CacheKey, CacheObject>;
|
11 |
|
12 | constructor(map?: Map<CacheKey, CacheObject>);
|
13 |
|
14 | get<T>(cacheKey: CacheKey, settings: ESLintSettings): T | undefined;
|
15 |
|
16 | set<T>(cacheKey: CacheKey, result: T): T;
|
17 |
|
18 | static getSettings(settings: ESLintSettings): { lifetime: number } & Omit<ESLintSettings['import/cache'], 'lifetime'>;
|
19 | }
|
20 | export default ModuleCache;
|
21 |
|
22 | export type { ModuleCache }
|