emiljanitzek / mongoose-delete-ts

Mongoose Soft Delete Plugin
MIT License
10 stars 4 forks source link

bump: Bump mongoose to 8.0.3 #17

Closed stenneepro closed 9 months ago

stenneepro commented 1 year ago

18

Here are two problems.

  1. 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?
  2. 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