Fix #788: Add typings and compiler support for TypedArrays

I don't really care.