diff --git a/src/MongoDB.ts b/src/MongoDB.ts index 3c4f8dd..838e7ba 100644 --- a/src/MongoDB.ts +++ b/src/MongoDB.ts @@ -1,5 +1,5 @@ import { inspect } from 'node:util'; -import { MongoClient, MongoClientOptions, Db, Document, WithId, ObjectId, Filter, IndexSpecification, CreateIndexesOptions, FindOptions } from 'mongodb'; +import { MongoClient, MongoClientOptions, Db, Document, WithId, ObjectId, Filter, IndexSpecification, CreateIndexesOptions, FindOptions, ModifyResult } from 'mongodb'; import { IServer, ILogger, LoggerClientOptions } from './interfaces/index.js'; type Credentials = { @@ -300,7 +300,9 @@ class MongoDB return result; } - async findOneAndDelete (db: string, filter: Document, meta = false) + async findOneAndDelete (db: string, filter: Document, meta: false): Promise> + async findOneAndDelete (db: string, filter: Document, meta: true): Promise> + async findOneAndDelete (db: string, filter: Document, meta = false) { if (!this.#db) throw new Error('MongoDB not connected');