From 640d6b58c5b809208885aebc59fbac3c1a7b1c0d Mon Sep 17 00:00:00 2001 From: wancat Date: Wed, 7 Feb 2024 10:41:46 +0800 Subject: [PATCH] fix ts error --- packages/models/src/index.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/models/src/index.ts b/packages/models/src/index.ts index c3b835c..d69ae25 100644 --- a/packages/models/src/index.ts +++ b/packages/models/src/index.ts @@ -6,10 +6,7 @@ export { default as Session } from './session.js' export { default as Command } from './command.js' export { default as UserProfile } from './userProfile.js' -export default async function connectDB(uri) { - const db = await mongoose.connect(uri, { - useNewUrlParser: true, - useUnifiedTopology: true, - }) +export default async function connectDB(uri: string) { + const db = await mongoose.connect(uri) return db.connection.getClient() }