Dependency injection for Typescript