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

2.0.3 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/timed-cache

Weekly Downloads

826

Version

2.0.3

License

MIT

Unpacked Size

3.33 kB

Total Files

5

Last publish

Collaborators

  • types