Installation
npm install --save @types/timed-cache
Summary
This package contains type definitions for timed-cache (https://github.com/HQarroum/timed-cache#readme).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/timed-cache.
index.d.ts
export interface CacheOptions {
defaultTtl: number;
}
export interface PutOptions {
ttl: number;
}
export type Key = string | object;
export default class Cache<T> {
constructor(options?: CacheOptions);
clear(): void;
get(key: Key): T | undefined;
put(key: Key, value: T, options?: PutOptions): void;
remove(key: Key): void;
size(): number;
}
Additional Details
- Last updated: Tue, 07 Nov 2023 15:11:36 GMT
- Dependencies: none
Credits
These definitions were written by Dillon Sellars.