A TypedArray is a JavaScript array-like object for handling binary data in a fixed numeric format. It supports several non-mutating methods such as toSorted, toReversed, and with, but not toSpliced, because TypedArrays do not implement splice in the first place.
What a TypedArray is in JavaScript
A TypedArray is a specialized array-like view over binary data in JavaScript. It gives you fixed-size numeric elements, so the data layout is predictable and the values are interpreted as bytes, integers, or floating-point numbers depending on the typed array kind.
That fixed numeric format is the key distinction from ordinary arrays: a TypedArray is designed for efficient binary handling, not heterogeneous JavaScript values. The view is backed by an ArrayBuffer, which is the underlying memory container that holds the bytes.
How TypedArrays behave differently from regular arrays
TypedArrays look familiar because they expose indexed access and many array-style operations, but they are intentionally stricter. Each element must fit the array’s numeric type, and attempts to store an out-of-range value are coerced according to the type’s rules rather than stored as-is.
They also differ in mutability and available methods. Modern non-mutating methods such as toSorted, toReversed, and with are available, but toSpliced is not because TypedArrays do not implement splice in the first place. That reflects their fixed-length, binary-oriented design.
Why TypedArrays matter for binary data
TypedArrays are used when data has to be processed in a precise numeric form, such as application-level binary protocols, media buffers, cryptographic material, or performance-sensitive numeric computation. Their value comes from predictable memory layout and the ability to work directly with raw bytes.
Because they are tied to binary representation, TypedArrays are often paired with DataView or other buffer APIs when code needs to interpret the same bytes in different ways. That makes them a core tool for low-level JavaScript data handling without turning the data into ordinary objects.
Common misunderstandings and practical limits
A TypedArray is not a general-purpose replacement for a normal array. It does not store arbitrary objects, it cannot grow and shrink like a regular list, and its method set is narrower because the structure is optimized for fixed-size numeric storage.
Another common misconception is that “typed” means type-safe in the language-design sense. In practice, it means each element is constrained to a numeric storage format, not that JavaScript performs compile-time type checking. The term is about representation, not static typing.