title: Typescript - Recursive Function Type
body: <p>I'm trying to write a recursive typescript family of functions that takes an array with elements of its own type as a parameter.</p>
  
  <pre><code>function example(parameter:number, path: {(parameter:number, path:{/*what do I put here?!*/}[]):boolean;}[]) : boolean
  {
      return false;
  }
  </code></pre>
  
  <p>This means I could call the function with:</p>
  
  <pre><code>let result = example(123, [example, example, anotherexample]);
  </code></pre>
  
  <p>The path / "What do I put here" part is where I'm stuck. I'd like to put the whole function type into a typedef somehow, also to improve readability.</p>