And also a few type aliases I noticed in the process. Found using https://github.com/JelleZijlstra/stublint/commit/59f9cac0951f431fbc3abf8803adeaac6e489aac
Closes #579.