2.0.4 • Published 6 months ago

@types/cache-manager-redis-store v2.0.4

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

Installation

npm install --save @types/cache-manager-redis-store

Summary

This package contains type definitions for cache-manager-redis-store (https://github.com/dabroek/node-cache-manager-redis-store).

Details

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

index.d.ts

// Type definitions for cache-manager-redis-store 2.0
// Project: https://github.com/dabroek/node-cache-manager-redis-store
// Definitions by: Eduardo Cancino <https://github.com/ecancinoz-chwy>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

import * as Redis from "redis";
import { Cache, Store, StoreConfig, CacheOptions } from "cache-manager";

declare const methods: CacheManagerRedisStore.RedisStoreConstructor;
export = methods;
export {};

declare module "cache-manager" {
    function caching(IConfig: StoreConfig & CacheOptions): CacheManagerRedisStore.RedisCache;
}

declare namespace CacheManagerRedisStore {
    interface RedisCache extends Cache {
        store: RedisStore;
    }

    interface RedisStore extends Store {
        name: "redis";
        getClient: () => Redis.RedisClient;
        isCacheableValue: (value: any) => boolean;
    }

    interface RedisStoreConstructor {
        create: (options?: Redis.ClientOpts) => RedisStore;
    }
}

Additional Details

Credits

These definitions were written by Eduardo Cancino.