index.d.ts 377 B

12345678910111213141516171819
  1. interface YLRUOptions {
  2. maxAge?: number;
  3. }
  4. declare namespace YLRU {
  5. export interface YLRUOptions {
  6. maxAge?: number;
  7. }
  8. }
  9. declare class YLRU {
  10. constructor(max: number)
  11. get: <T = any>(key: any, options?: YLRUOptions) => T | undefined;
  12. set: <T = any>(key: any, value: T, options?: YLRUOptions) => void;
  13. keys: () => any[];
  14. reset: () => void;
  15. }
  16. export = YLRU;