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

1.9.7 • Public • Published

Installation

npm install --save @types/koa-mongo

Summary

This package contains type definitions for koa-mongo (https://github.com/nswbmw/koa-mongo).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/koa-mongo.

index.d.ts

import { Options } from "generic-pool";
import { Middleware } from "koa";
import { Db, MongoClient, MongoClientOptions } from "mongodb";

declare module "koa" {
    interface BaseContext {
        mongo: MongoClient;
        db: Db;
    }
}

declare namespace mongo {
    interface ConnectionOptions extends Options {
        host?: string | undefined;
        port?: number | undefined;
        db?: string | undefined;
        authSource?: string | undefined;
        uri?: string | undefined;
        url?: string | undefined;
    }
}

declare function mongo(connOptions?: mongo.ConnectionOptions, confOptions?: MongoClientOptions): Middleware;

export = mongo;

Additional Details

Credits

These definitions were written by Andrea Giurgola.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/koa-mongo

Weekly Downloads

44

Version

1.9.7

License

MIT

Unpacked Size

4.2 kB

Total Files

5

Last publish

Collaborators

  • types