Skip to content

Commit

Permalink
types(model): convert InsertManyResult to interface and remove unnece…
Browse files Browse the repository at this point in the history
…ssary insertedIds override
  • Loading branch information
vkarpov15 committed Oct 21, 2024
1 parent 830b010 commit 9b1164c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions types/models.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,9 @@ declare module 'mongoose' {
throwOnValidationError?: boolean;
}

type InsertManyResult<T> = mongodb.InsertManyResult<T> & {
insertedIds: {
[key: number]: InferId<T>;
};
interface InsertManyResult<T> extends mongodb.InsertManyResult<T> {
mongoose?: { validationErrors?: Array<Error.CastError | Error.ValidatorError> };
};
}

type UpdateWriteOpResult = mongodb.UpdateResult;
type UpdateResult = mongodb.UpdateResult;
Expand Down

0 comments on commit 9b1164c

Please sign in to comment.