I found this, but it did not help me in this instance: Cannot use 'new' with an expression whose type lacks a call or construct signature
I have a similar problem. The JavaScript has the following:
public clone(data) {
return new this.constructor({
...this.data,
...data,
});
}
This is flagged as an error: Cannot use 'new' with an expression whose type lacks a call or construct signature.ts(2351)
How can I rewrite in TypeScript?