Class Napi::TypedArray
inherits from class Napi::Object
.
The Napi::TypedArray
class corresponds to the
JavaScript TypedArray
class.
Initializes an empty instance of the Napi::TypedArray
class.
Napi::TypedArray::TypedArray();
Initializes a wrapper instance of an existing Napi::TypedArray
instance.
Napi::TypedArray::TypedArray(napi_env env, napi_value value);
[in] env
: The environment in which to create theNapi::TypedArray
instance.[in] value
: TheNapi::TypedArray
reference to wrap.
napi_typedarray_type Napi::TypedArray::TypedArrayType() const;
Returns the type of this instance.
Napi::ArrayBuffer Napi::TypedArray::ArrayBuffer() const;
Returns the backing array buffer.
uint8_t Napi::TypedArray::ElementSize() const;
Returns the size of one element, in bytes.
size_t Napi::TypedArray::ElementLength() const;
Returns the number of elements.
size_t Napi::TypedArray::ByteOffset() const;
Returns the offset into the Napi::ArrayBuffer
where the array starts, in bytes.
size_t Napi::TypedArray::ByteLength() const;
Returns the length of the array, in bytes.