title: How do I fully type out this factorial function?
body: <p><code>const fact: (n: number) =&gt; number = ((f: any) =&gt; f(f))((g: any) =&gt; (n : number) =&gt; n &gt; 0 ? n * g(g)(n - 1) : 1);</code></p>
  
  <p>I started playing with Typescript yesterday, and my mind breaks just trying. n is obviously number, but what about f and g?</p>