Skip to content

Commit

Permalink
Merge pull request #106 from blove/97-typescript-declarations
Browse files Browse the repository at this point in the history
Fixed the TypeScript declaration file to property merge the Transport…
  • Loading branch information
yurijmikhalevich committed Sep 25, 2017
2 parents d01a77b + 69f3570 commit 1e12747
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
19 changes: 16 additions & 3 deletions lib/winston-mongodb.d.ts
@@ -1,7 +1,20 @@
// Type definitions for winston-mongodb
// Project: https://github.com/winstonjs/winston-mongodb
// Definitions by: miton18 <https://github.com/miton18>
// Definitions by: miton18 <https://github.com/miton18>, blove <https://github.com/blove>

declare module 'winston-mongodb' {
export function MongoDB(options: Object): any;
/// <reference types="winston" />

import { TransportInstance, Transports, Winston } from "winston";

declare namespace winston {
export interface Winston {
transports: WinstonMongoDBTransports;
}
export interface MongoDBTransportInstance extends TransportInstance {}
export interface WinstonMongoDBTransports extends Transports {
MongoDB: MongoDBTransportInstance;
}
}

declare const winston: winston.Winston;
export = winston;
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -33,6 +33,7 @@
"logger"
],
"dependencies": {
"@types/winston": "^2.3.2",
"mongodb": "^2.2.19"
},
"devDependencies": {
Expand Down

0 comments on commit 1e12747

Please sign in to comment.