// Type definitions for lru-cache v2.5.0 // Project: https://github.com/isaacs/node-lru-cache // Definitions by: Bart van der Schoor // Definitions: https://github.com/borisyankov/DefinitelyTyped declare module 'lru-cache' { function LRU(opts: LRU.Options): LRU.Cache; function LRU(max: number): LRU.Cache; module LRU { interface Options { max?: number; maxAge?: number; length?: (value: T) => number; dispose?: (key: string, value: T) => void; stale?: boolean; } interface Cache { set(key: string, value: T): void; get(key: string): T; peek(key: string): T; has(key: string): boolean del(key: string): void; reset(): void; forEach(iter: (value: T, key: string, cache: Cache) => void, thisp?: any): void; keys(): string[]; values(): T[]; } } export = LRU; }