Typescript Nested Class Python Syntax For Functions