@types/mem-cache
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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.

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.4
    5
  • 1.0.3
    0
  • 1.0.2
    0
  • 1.0.1
    0
  • 1.0.0
    0

Package Sidebar

Install

npm i @types/mem-cache

Weekly Downloads

5

Version

1.0.4

License

MIT

Unpacked Size

3.65 kB

Total Files

5

Last publish

Collaborators

  • types