Mongoose schema/model using typescript
You should be able to say something like the following:
export var UserModel = <IUserModel>M.model('user', userSchema);
Then you will have proper typechecking/intellisense when you reference the UserModel.
You should be able to say something like the following:
export var UserModel = <IUserModel>M.model('user', userSchema);
Then you will have proper typechecking/intellisense when you reference the UserModel.