Recursive Functions Return Type in TypeScript - Effect Community