1.0.4 • Published 6 months ago

@types/mem-cache v1.0.4

Weekly downloads
221
License
MIT
Repository
github
Last release
6 months ago

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

// Type definitions for mem-cache 1.0
// Project: https://github.com/silviom/node-mem-cache
// Definitions by: Pedro Mutter <https://github.com/MutterPedro>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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: Thu, 08 Jul 2021 18:50:40 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Pedro Mutter.

1.0.2

8 months ago

1.0.4

6 months ago

1.0.3

7 months ago

1.0.1

3 years ago

1.0.0

5 years ago