Related resources for Recursive function in typescript