Method naming
We are overwriting Mongoose deleteOne method, deleteOne, deleteMany static methods, there are no ways to delete document permanently.
I don't think it's good, how about rename overwritten methods, static methods to support all functions in Mongoose?
Type
As we overwrite some methods, static methods and they have different parameters, return values with Mongoose original functions, we must add them to interface.
For example
In Mongoose : deleteOne(options?: QueryOptions): QueryWithHelpers<any, this, TQueryHelpers>;
In mongoose-delete-ts: deleteOne(saveOptions?: SaveOptions): Promise;
https://github.com/stenneepro/mongoose-delete-ts/blob/bump/mongoose/source/methods.ts#L9
18
deleteOne
method return type (deleteOne returns query from Mongoose 8.x) https://mongoosejs.com/docs/migrating_to_8.html#document-prototype-deleteone-now-returns-a-queryHere are two problems.