Why this code in typescript 3.9.2 gets me this error:
'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.
Code is:
const Module = function(){
function sayHello(){
console.log('Hello');
}
return {
sayHello: sayHello
}
};
let module: any = new Module();