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, {
14
14
UpdateWriteOpResult ,
15
15
AggregateOptions ,
16
16
WithLevel1NestedPaths ,
17
- NestedPaths ,
18
- InferSchemaType
17
+ InferSchemaType ,
18
+ DeleteResult
19
19
} from 'mongoose' ;
20
20
import { expectAssignable , expectError , expectType } from 'tsd' ;
21
21
import { AutoTypedSchemaType , autoTypedSchema } from './schema.test' ;
@@ -514,7 +514,7 @@ function gh12100() {
514
514
function modelRemoveOptions ( ) {
515
515
const cmodel = model ( 'Test' , new Schema ( ) ) ;
516
516
517
- cmodel . deleteOne ( { } , { } ) ;
517
+ const res : DeleteResult = await cmodel . deleteOne ( { } , { } ) ;
518
518
}
519
519
520
520
async function gh12286 ( ) {
Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ declare module 'mongoose' {
72
72
} ;
73
73
74
74
type UpdateWriteOpResult = mongodb . UpdateResult ;
75
+ type UpdateResult = mongodb . UpdateResult ;
76
+ type DeleteResult = mongodb . DeleteResult ;
75
77
76
78
interface MapReduceOptions < T , K , R > {
77
79
map : Function | string ;
You can’t perform that action at this time.
0 commit comments