index.d.ts 356 B

123456789101112131415161718
  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. }
  15. export = YLRU;