Fix #788: Add typings and compiler support for TypedArrays

In the code it is still on hold. Should we remove it completely then?