Fix #788: Add typings and compiler support for TypedArrays

This class is an implementation detail. It should be private in the companion object of `TagSelectable`.