Support type alias

Fix #672.