Support type alias

Fix #672.
Is there a better way? Perhaps adding #if DEBUG around it? It's annoying to uncomment it every time I do bug fixing.