Fix #788: Add typings and compiler support for TypedArrays

Why not make this the primary constructor?