0.0.4 • Published 6 months ago

@types/cache-manager-fs-hash v0.0.4

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

Installation

npm install --save @types/cache-manager-fs-hash

Summary

This package contains type definitions for cache-manager-fs-hash (https://github.com/rolandstarke/node-cache-manager-fs-hash#readme).

Details

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

index.d.ts

// Type definitions for cache-manager-fs-hash 0.0
// Project: https://github.com/rolandstarke/node-cache-manager-fs-hash#readme
// Definitions by: René Schapka <https://github.com/schapka>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import { Store, StoreConfig, CacheOptions, Cache } from "cache-manager";

interface FsHashStoreOptions {
    path?: string | undefined;
    ttl?: number | undefined;
    maxsize?: number | undefined;
    subdirs?: boolean | undefined;
    zip?: boolean | undefined;
}

interface FsHashStoreConfig {
    store: FsHashStoreConstructor;
    options?: FsHashStoreOptions | undefined;
}

interface FsHashStoreConstructor {
    create: (config: FsHashStoreConfig) => Store;
}

declare module "cache-manager" {
    function caching(IConfig: FsHashStoreConfig | (StoreConfig & CacheOptions)): Cache;
}

declare const methods: FsHashStoreConstructor;
export = methods;
export {};

Additional Details

Credits

These definitions were written by René Schapka.