logoalt Hacker News

domlebo70yesterday at 4:45 AM1 replyview on HN

We do this via run in TS:

    export const run = <T>(f: () => T): T => {
      return f();
    };

Replies

notpushkinyesterday at 6:51 AM

Can you clarify why do you prefer this over an IIFE `(() => {...})()`?

show 1 reply