Closed
Description
class MyCallableClass {
property: string;
constructor() {
//constructor body
}
(): MyCallableClass { // could be 'string' or any other type
// call signature body
return new MyCallableClass();
}
}
would emit :
function MyClass() {
if (this instanceof MyClass) {
//constructor body
} else {
// call signature body
return new MyCallableClass();
}
}