Dependency injection using `typealias` declarations

Yes this is once been pitched by @anandabits as "Generalized supertype constraint".