For now, I can do:
const f = () => 'result';
f.customProperty = 5;
Is it possible to do this in one command? Something like:
const f = {
() => 'result',
customProperty: 5,
};
Ok, there is a possibility:
f = (() => {
const f = () => 'result';
f.customProperty = 5;
return f;
})();
But... Isn't there something more elegant?