From 8cb51be625fbba0988cba5847363dc56eed3eeee Mon Sep 17 00:00:00 2001 From: Roberts Slisans Date: Wed, 23 Aug 2017 11:06:26 +0300 Subject: [PATCH] Fix for no documents found - make results optional --- types/mongoose-simple-random/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/mongoose-simple-random/index.d.ts b/types/mongoose-simple-random/index.d.ts index 16b1c21483..679ba1fbee 100644 --- a/types/mongoose-simple-random/index.d.ts +++ b/types/mongoose-simple-random/index.d.ts @@ -15,7 +15,7 @@ declare module 'mongoose-simple-random' { declare module "mongoose" { interface Model extends NodeJS.EventEmitter, ModelProperties { - findRandom(conditions: Object, projection?: Object | null, options?: Object | null, callback?: (err: any, res: T[]) => void) + findRandom(conditions: Object, projection?: Object | null, options?: Object | null, callback?: (err: any, res?: T[]) => void) : void; } }