@types/mongoose update(): add option multipleCastError

source: https://github.com/Automattic/mongoose/pull/7513
This commit is contained in:
JulioJu
2019-02-12 02:16:55 +01:00
parent 21cd41db1a
commit c49904aa71
+10
View File
@@ -2254,6 +2254,11 @@ declare module "mongoose" {
* functions that update validation runs. Does nothing if runValidators is false.
*/
context?: string;
/**
* by default, mongoose only returns the first error that occurred in casting the query.
* Turn on this option to aggregate all the cast errors.
*/
multipleCastError?: boolean;
}
interface QueryUpdateOptions extends ModelUpdateOptions {
@@ -3361,6 +3366,11 @@ declare module "mongoose" {
overwrite?: boolean;
/** other options */
[other: string]: any;
/**
* by default, mongoose only returns the first error that occurred in casting the query.
* Turn on this option to aggregate all the cast errors.
*/
multipleCastError?: boolean;
}
interface ModelMapReduceOption<T, Key, Val> {