mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 19:07:08 +00:00
Merge pull request #33358 from penumbra1/mongoose
Add schema options: selectPopulatedPaths, storeSubdocValidationError
This commit is contained in:
commit
823b476ecb
14
types/mongoose/index.d.ts
vendored
14
types/mongoose/index.d.ts
vendored
@ -18,6 +18,7 @@
|
||||
// Emmanuel Gautier <https://github.com/emmanuelgautier>
|
||||
// Frontend Monster <https://github.com/frontendmonster>
|
||||
// Ming Chen <https://github.com/mingchen>
|
||||
// Olga Isakova <https://github.com/penumbra1>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 2.3
|
||||
|
||||
@ -1060,12 +1061,25 @@ declare module "mongoose" {
|
||||
validateBeforeSave?: boolean;
|
||||
/** defaults to "__v" */
|
||||
versionKey?: string | boolean;
|
||||
/**
|
||||
* By default, Mongoose will automatically
|
||||
* select() any populated paths.
|
||||
* To opt out, set selectPopulatedPaths to false.
|
||||
*/
|
||||
selectPopulatedPaths?: boolean;
|
||||
/**
|
||||
* skipVersioning allows excluding paths from
|
||||
* versioning (the internal revision will not be
|
||||
* incremented even if these paths are updated).
|
||||
*/
|
||||
skipVersioning?: any;
|
||||
/**
|
||||
* Validation errors in a single nested schema are reported
|
||||
* both on the child and on the parent schema.
|
||||
* Set storeSubdocValidationError to false on the child schema
|
||||
* to make Mongoose only report the parent error.
|
||||
*/
|
||||
storeSubdocValidationError?: boolean;
|
||||
/**
|
||||
* If set timestamps, mongoose assigns createdAt
|
||||
* and updatedAt fields to your schema, the type
|
||||
|
||||
Loading…
Reference in New Issue
Block a user