Please consider my previous post A Function that can be an Object in JavaScript ? [duplicate] which was marked as duplicate and it makes perfect sense. I was asking how I could resolve that :
function foo () {}
foo.bar = function () {}
because during testing this didn't work, but while it would make pure sense in commonJS, my issue is TypeScript specific. If I write the snippet above in my editor and try to compile, Typescript will tell :
Property 'bar' does not exist on type '() => void'.
How should I write to give a function property a function ?