File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1634,3 +1634,7 @@ function gh14825() {
16341634 type SchemaType = InferSchemaType < typeof schema > ;
16351635 expectAssignable < User > ( { } as SchemaType ) ;
16361636}
1637+
1638+ function gh14879 ( ) {
1639+ Schema . Types . String . setters . push ( ( val ?: unknown ) => typeof val === 'string' ? val . trim ( ) : val ) ;
1640+ }
Original file line number Diff line number Diff line change @@ -216,6 +216,9 @@ declare module 'mongoose' {
216216 /** Attaches a getter for all instances of this schema type. */
217217 static get ( getter : ( value : any ) => any ) : void ;
218218
219+ /** Array containing default setters for all instances of this SchemaType */
220+ static setters : Function [ ] ;
221+
219222 /** The class that Mongoose uses internally to instantiate this SchemaType's `options` property. */
220223 OptionsConstructor : SchemaTypeOptions < T > ;
221224
You can’t perform that action at this time.
0 commit comments