Fix #788: Add typings and compiler support for TypedArrays

This one should be `Int`, I think. The very purpose of the clamped version is that values out of range will be clamped to [0,255] instead of simply losing their most significant bits. Values put in there will likely come from computations, hence will be Ints, and having to call `toShort` on such a thing will already drop the two most significant bytes, which does not seem right.