Skip to content

Commit

Permalink
types(connection): explicitly export connect(), createConnection()
Browse files Browse the repository at this point in the history
Re: #15178
  • Loading branch information
vkarpov15 committed Jan 14, 2025
1 parent 5af0a10 commit 61f0503
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions types/connection.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ declare module 'mongoose' {
const connections: Connection[];

/** Opens Mongoose's default connection to MongoDB, see [connections docs](https://mongoosejs.com/docs/connections.html) */
function connect(uri: string, options?: ConnectOptions): Promise<Mongoose>;
export function connect(uri: string, options?: ConnectOptions): Promise<Mongoose>;

/** Creates a Connection instance. */
function createConnection(uri: string, options?: ConnectOptions): Connection;
function createConnection(): Connection;
export function createConnection(uri: string, options?: ConnectOptions): Connection;
export function createConnection(): Connection;

function disconnect(): Promise<void>;
export function disconnect(): Promise<void>;

/**
* Connection ready state
Expand Down

0 comments on commit 61f0503

Please sign in to comment.