title: How to Type something like _.once
body: <p>just starting out with TS, how would I go about typing something like...</p>
  
  <pre><code>function once(fn) {
    var haveResult = false;
    var result = null;
  
    return (...args) =&gt; {
      if (!haveResult) {
        haveResult = true;
        result = fn.apply(this, args);
      }
  
      return result;
    };
  }
  </code></pre>
  
  <p>Where once can receive a function with any params and return any. Just like lodash's _.once</p>