更新时间:2023-09-19 10:52:40
您的构造函数需要一个对象作为其参数.因此,要构造MyClass
的对象,您需要执行以下操作:
Your constructor requires an object as its argument. So to construct an object of MyClass
, you'll need to do something like:
let obj = new MyClass({}) // construct with an empty object as the arg
// or:
let argObj = {a: 123}
let obj = new MyClass(argObj)