How can I get all the properties in Typescript Class with Optional properties

前端 未结 0 937
终归单人心
终归单人心 2021-01-19 11:43

Let\'s say I have

class MyType {
  property1?: string,
  property2?: string
}

which all the properties are OPTIONAL.

How can I get an

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