2.3.0 • Published 3 years ago

@types/keyv__redis v2.3.0

Weekly downloads
175
License
MIT
Repository
-
Last release
3 years ago

Installation

npm install --save @types/keyv__redis

Summary

This package contains type definitions for @keyv/redis (https://github.com/lukechilds/keyv-redis).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/keyv__redis.

index.d.ts

// Type definitions for @keyv/redis 1.3
// Project: https://github.com/lukechilds/keyv-redis
// Definitions by: BendingBender <https://github.com/BendingBender>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3

/// <reference types="node" />

import { Store } from 'keyv';
import { ClientOpts } from 'redis';
import { EventEmitter } from 'events';

export = KeyvRedis;

declare class KeyvRedis extends EventEmitter implements Store<string | undefined> {
    readonly ttlSupport: true;
    namespace?: string | undefined;

    constructor(options?: KeyvRedis.Options);
    constructor(uri: string, options?: KeyvRedis.Options);

    get(key: string): Promise<string | undefined>;
    set(key: string, value: string | undefined, ttl?: number): Promise<number>;
    delete(key: string): Promise<boolean>;
    clear(): Promise<void>;
}

declare namespace KeyvRedis {
    interface Options extends ClientOpts {
        uri?: string | undefined;
    }
}

Additional Details

Credits

These definitions were written by BendingBender.

2.3.0

3 years ago

1.3.3

4 years ago

1.3.2

4 years ago

1.3.1

5 years ago

1.3.0

6 years ago