Closed
Description
So I had this:
type NestedRequestHandler = RequestHandler | Array<RequestHandler> | Array<Array<RequestHandler>>
for a certain situation it was actually insufficient and the compiler required me to do this:
type NestedRequestHandler = RequestHandler | Array<RequestHandler> | Array<Array<RequestHandler> | RequestHandler>
I can't figure out why the compiler forced me to do that, the above seems like a bug. Since the second operand in the union type seems like it would have covered it. Am I right or wrong?
Anyway, what I am ultimately looking for is a recursive type for arrays, like so:
https://stackoverflow.com/questions/53646270/declare-arbitrarily-nested-array-recursive-type-definition