- Handle null enums
- Better naming for pluralized words
- Mongoose 6 support
- Parse JSDocs from Mongoose Schemas and copy into generated files.
- Handle nested query population
- Typesafe query population
- Fix plural naming
- Added
mongoose.Query.populate
overload to narrow query typings &--no-populate-overload
flag to disable the behaviour - Added new population helper types and type guards
PopulatedDocument
,IsPopulated
- Update to Mongoose 5.12.10
- Added
--no-mongoose
flag to generate types without mongoose references. This option removes document types and replaces ObjectId with string #7
- Removed need to typecast method, static and query objects (this was required to support function types)
- Query types can now be passed as a generic to the Mongoose model constructor. This greatly simplifies query typing
- Update to Mongoose 5.12.6
- remove CLI options:
--js
(generator depends too much on TS compiler libraries now, so using this with JS has very limited functionality. Convert type files to TS before using mongoose-tsgen moving forward)--augment
(added much unnecessary complexity, functionality can be achieved using a simple user-created file)--no-func-types
(this was mainly used to avoid using TS compiler API when running the generator. These days the generator depends on the TS compiler API for all basic functions so this option has no use)
- Use new Mongoose type updates & fixes (5.11.13 and on)
- Added
--debug
flag to print useful debug info