File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ import mongoose, {
1414 UpdateWriteOpResult ,
1515 AggregateOptions ,
1616 WithLevel1NestedPaths ,
17- NestedPaths ,
18- InferSchemaType
17+ InferSchemaType ,
18+ DeleteResult
1919} from 'mongoose' ;
2020import { expectAssignable , expectError , expectType } from 'tsd' ;
2121import { AutoTypedSchemaType , autoTypedSchema } from './schema.test' ;
@@ -514,7 +514,7 @@ function gh12100() {
514514function modelRemoveOptions ( ) {
515515 const cmodel = model ( 'Test' , new Schema ( ) ) ;
516516
517- cmodel . deleteOne ( { } , { } ) ;
517+ const res : DeleteResult = await cmodel . deleteOne ( { } , { } ) ;
518518}
519519
520520async function gh12286 ( ) {
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ declare module 'mongoose' {
7272 } ;
7373
7474 type UpdateWriteOpResult = mongodb . UpdateResult ;
75+ type UpdateResult = mongodb . UpdateResult ;
76+ type DeleteResult = mongodb . DeleteResult ;
7577
7678 interface MapReduceOptions < T , K , R > {
7779 map : Function | string ;
You can’t perform that action at this time.
0 commit comments