how to use string literal types in interfaces with mongoose?

后端 未结 0 1239
日久生厌
日久生厌 2020-12-12 17:32

I want to define a field property and limit it to certain values. I was hoping for something like this:

class ITopic extends Document {
  public status?: stri         


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