Installation
npm install --save @types/mem-cache
Summary
This package contains type definitions for mem-cache (https://github.com/silviom/node-mem-cache).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mem-cache.
index.d.ts
/// <reference types="node" />
import { EventEmitter } from "events";
interface CacheOptions {
timeout?: number | undefined;
doesNotRenewTimeout?: boolean | undefined;
timeoutDisabled?: boolean | undefined;
}
declare class Cache extends EventEmitter {
keys: string[];
length: number;
constructor(options?: number | CacheOptions);
set(key: string, value: any, timeout?: number): void;
get(key: string): any;
remove(key: string): void;
clean(): void;
}
export = Cache;
Additional Details
- Last updated: Tue, 07 Nov 2023 09:09:39 GMT
- Dependencies: @types/node
Credits
These definitions were written by Pedro Mutter.