Skip to content

Commit

Permalink
Merge pull request #12948 from simon-abbott/patch
Browse files Browse the repository at this point in the history
fix: export mongodb types more robustly
  • Loading branch information
vkarpov15 committed Feb 27, 2023
2 parents 23b95c9 + 4220887 commit 28fd1b6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions test/types/mongo.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import * as mongoose from 'mongoose';
import { expectType } from 'tsd';

import GridFSBucket = mongoose.mongo.GridFSBucket;
2 changes: 1 addition & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ declare module 'mongoose' {
export function setDriver(driver: any): Mongoose;

/** The node-mongodb-native driver Mongoose uses. */
export const mongo: typeof mongodb;
export { mongodb as mongo };

/** Declares a global plugin executed on all Schemas. */
export function plugin(fn: (schema: Schema, opts?: any) => void, opts?: any): Mongoose;
Expand Down

0 comments on commit 28fd1b6

Please sign in to comment.