Value.newTypedArray

Create a new typed array containing a given amount of elements.

Create a #JSCValue referencing a new typed array with space for length elements of a given type. As all typed arrays must have an associated ArrayBuffer, a new one of suitable size will be allocated to store the elements, which will be initialized to zero.

The type must not be JSC_TYPED_ARRAY_NONE.

Parameters

contexta #JSCContext
typethe type of array elements
lengthnumber of elements in the array

Returns

a #JSCValue