1.9.7 • Published 7 months ago

@types/koa-mongo v1.9.7

Weekly downloads
20
License
MIT
Repository
github
Last release
7 months ago

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

// Type definitions for koa-mongo 1.9
// Project: https://github.com/nswbmw/koa-mongo
// Definitions by: Andrea Giurgola <https://github.com/Shqrp>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// Minimum TypeScript Version: 4.1

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

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.

1.9.7

7 months ago

1.9.6

7 months ago

1.9.5

8 months ago

1.9.4

1 year ago

1.9.3

2 years ago

1.9.2

3 years ago

1.9.1

3 years ago

1.9.0

3 years ago