TypeScript: Infer class properties from constructor(options) or vice versa

后端 未结 0 1008
谎友^
谎友^ 2021-02-04 00:56

I\'m converting some JS to TS, something like this:

class User {
  constructor({ name, age }) {
    this.name = name
    th         


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