MainController in typescript.