File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ declare module 'mongoose' {
2424 | 'runValidators'
2525 | 'sanitizeProjection'
2626 | 'sanitizeFilter'
27+ | 'schemaLevelProjections'
2728 | 'setDefaultsOnInsert'
2829 | 'strict'
2930 | 'strictQuery'
@@ -179,6 +180,11 @@ declare module 'mongoose' {
179180 * aren't explicitly allowed using `mongoose.trusted()`.
180181 */
181182 sanitizeFilter ?: boolean ;
183+ /**
184+ * Enable or disable schema level projections for this query. Enabled by default.
185+ * Set to `false` to include fields with `select: false` in the query result by default.
186+ */
187+ schemaLevelProjections ?: boolean ;
182188 setDefaultsOnInsert ?: boolean ;
183189 skip ?: number ;
184190 sort ?: any ;
@@ -734,6 +740,12 @@ declare module 'mongoose' {
734740 */
735741 sanitizeProjection ( value : boolean ) : this;
736742
743+ /**
744+ * Enable or disable schema level projections for this query. Enabled by default.
745+ * Set to `false` to include fields with `select: false` in the query result by default.
746+ */
747+ schemaLevelProjections ( value : boolean ) : this;
748+
737749 /** Specifies which document fields to include or exclude (also known as the query "projection") */
738750 select < RawDocTypeOverride extends { [ P in keyof RawDocType ] ?: any } = { } > (
739751 arg : string | string [ ] | Record < string , number | boolean | string | object >
You can’t perform that action at this time.
0 commit comments