TypeScript anonymous function

Viewed 19340

What is the TypeScript equivalent of this JavaScript?

(function() { 
    /* code here */ 
})();

I have tried this

() => {
    /* code here */
}

But this produces

(function() {
    /* code here */
});

I need the extra set of parenthesis at the end to perform an execution of the anonymous function.

1 Answers
Related