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

2.0.2 • Public • Published

Installation

npm install --save @types/flat-cache

Summary

This package contains type definitions for flat-cache (https://github.com/royriojas/flat-cache#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/flat-cache.

index.d.ts

export interface Cache {
    load(cacheId: string, cacheDir?: string): void;
    loadFile(pathToFile: string): void;
    all(): { [key: string]: any };
    keys(): string[];
    setKey(key: string, value: any): void;
    removeKey(key: string): void;
    getKey(key: string): any;
    save(noPrune?: boolean): void;
    removeCacheFile(): boolean;
    destroy(): void;
}

export function load(cacheId: string, cacheDir?: string): Cache;

export function create(cacheId: string, cacheDir?: string): Cache;

export function createFromFile(filePath: string): Cache;

export function clearCacheById(cacheId: string, cacheDir?: string): boolean;

export function clearAll(cacheDir?: string): boolean;

Additional Details

  • Last updated: Tue, 07 Nov 2023 03:09:37 GMT
  • Dependencies: none

Credits

These definitions were written by Kevin Pollet.

Versions

Current Tags

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.2
    21,379
  • 2.0.1
    47
  • 2.0.0
    32,474

Package Sidebar

Install

npm i @types/flat-cache

Weekly Downloads

43,836

Version

2.0.2

License

MIT

Unpacked Size

3.95 kB

Total Files

5

Last publish

Collaborators

  • types