Changing return type from string to Type when resolving dependencies

Changing return type from string to Type when resolving dependencies