From 9b1164c091c1c01239dfe394587b8e0dbd9ae1c0 Mon Sep 17 00:00:00 2001 From: Valeri Karpov Date: Mon, 21 Oct 2024 08:04:20 -0400 Subject: [PATCH] types(model): convert InsertManyResult to interface and remove unnecessary insertedIds override --- types/models.d.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/types/models.d.ts b/types/models.d.ts index 84fc412ba0..2011f136fc 100644 --- a/types/models.d.ts +++ b/types/models.d.ts @@ -64,12 +64,9 @@ declare module 'mongoose' { throwOnValidationError?: boolean; } - type InsertManyResult = mongodb.InsertManyResult & { - insertedIds: { - [key: number]: InferId; - }; + interface InsertManyResult extends mongodb.InsertManyResult { mongoose?: { validationErrors?: Array }; - }; + } type UpdateWriteOpResult = mongodb.UpdateResult; type UpdateResult = mongodb.UpdateResult;