diff --git a/test/types/document.test.ts b/test/types/document.test.ts index c9836501271..f1949c7bea2 100644 --- a/test/types/document.test.ts +++ b/test/types/document.test.ts @@ -39,7 +39,7 @@ const Test = model('Test', schema); void async function main() { const doc = await Test.findOne().orFail(); - expectType>(doc.deleteOne()); + expectType>(doc.deleteOne()); }(); diff --git a/types/document.d.ts b/types/document.d.ts index 7a2934b95ac..efd25dae253 100644 --- a/types/document.d.ts +++ b/types/document.d.ts @@ -107,7 +107,7 @@ declare module 'mongoose' { db: Connection; /** Removes this document from the db. */ - deleteOne(options?: QueryOptions): QueryWithHelpers; + deleteOne(options?: QueryOptions): Promise; /** * Takes a populated field and returns it to its unpopulated state. If called with