Can i use private properties in Typegoose? Can i use private properties in Typegoose? mongoose mongoose

Can i use private properties in Typegoose?


as per the comment clarification of private
you can set select: false as an prop option to not have it retrieved by default, you can activate it again by using .select('+your_prop_name') in any query (like after an .find function)t (the property still gets saved to the db)

Note about typescript's private: this is just private for types, but public at runtime (and the new # private field is not yet tested with typegoose)