blink icon indicating copy to clipboard operation
blink copied to clipboard

Add typings for mongoose

Open krtk6160 opened this issue 4 years ago • 1 comments

From @samerbuna :

I don't think typeof User is a good idea but I see it used in the mongoose schema too, so maybe leave it for now and create a new issue to refactor all mongoose types to use interfaces extending mongoose documents.

krtk6160 avatar Jul 12 '21 19:07 krtk6160

When we do this I would advocate a naming pattern like XxxRecord ie UserRecord to clearly associate these types with the persistence layer that will hopefully emerge. The concept of a plain User type is then free to be used for business layer logic.

bodymindarts avatar Jul 18 '21 05:07 bodymindarts