2.1.5 • Published 3 years ago

@types/keyv__mongo v2.1.5

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

Installation

npm install --save @types/keyv__mongo

Summary

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

Details

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

index.d.ts

// Type definitions for @keyv/mongo 1.0
// Project: https://github.com/lukechilds/keyv-mongo
// 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 { EventEmitter } from 'events';

export = KeyvMongo;

declare class KeyvMongo<TValue> extends EventEmitter implements Store<TValue> {
    readonly ttlSupport: false;
    namespace?: string | undefined;

    constructor(uri?: string);
    constructor(options?: KeyvMongo.Options); // tslint:disable-line:unified-signatures

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

declare namespace KeyvMongo {
    interface Options {
        uri?: string | undefined;
        url?: string | undefined;
        collection?: string | undefined;
    }
}

Additional Details

Credits

These definitions were written by BendingBender.

2.1.5

3 years ago

1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

6 years ago