I'm trying to write a recursive typescript family of functions that takes an array with elements of its own type as a parameter.
function example(parameter:number, path: {(parameter:number, path:{/*what do I put here?!*/}[]):boolean;}[]) : boolean
{
return false;
}
This means I could call the function with:
let result = example(123, [example, example, anotherexample]);
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.