How to properly type mongoose referenced document in typescript

后端 未结 0 480
孤街浪徒
孤街浪徒 2021-02-06 03:22

The mongoose.Types.ObjectId works fine but I want to better type it using the User Document type, so if I populate it, it will infer the correct type like profile.user.toO

相关标签:
回答
  • 消灭零回复
提交回复
热议问题