import HLRU from 'hashlru' ; export interface LruCache < T > { get ( key ) : T | undefined ; set ( key , value ) : void ; } export function getLruCache < T > ( cacheSize ) { if ( cacheSize >= 1 ) { return HLRU ( cacheSize ) ; } return { get : ( ) => undefined , set : ( ) => { } , } ; }