generalize type alias handling.