Add typings and compiler support for TypedArrays