我尝试在Typescript中克隆类的实例,但是目前我找不到方法。
期望什么?
const someInstance = new SomeClass();
someInstance.someMethodCalls();
const objectInstanceClone = ...; // Here I need an exact clone with type SomeClass and all methods.
我无法使用Object.assign
或ES6传播算子来实现此目标。