Fix #788: Add typings and compiler support for TypedArrays

Same here for primary ctor then.