I'm currently facing an issue while compiling Typescript where the compiler is throwing an error:
TypeError: myVariable is not a function
at Object.<anonymous> (/home/anon/Desktop/Typescript/main.js:37:1)
at Module._compile (internal/modules/cjs/loader.js:738:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:749:10)
at Module.load (internal/modules/cjs/loader.js:630:32)
at tryModuleLoad (internal/modules/cjs/loader.js:570:12)
at Function.Module._load (internal/modules/cjs/loader.js:562:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:801:12)
at internal/main/run_main_module.js:21:11
It seems like myVariable is being treated as 'any' type instead of a function, causing this error. However, I believe that it should be accessible as a function.
Thank you
let myVariable: any = 10;
console.log(myVariable.name);
console.log();
myVariable();