WPEJavaScriptCore.Value.new_typed_array
Description: Reference for WPEJavaScriptCore.Value.new_typed_array

### Constructor

# WPEJavaScriptCore Valuenew_typed_array

since: 2.38

#### Declaration [src]

    JSCValue*
    jsc_value_new_typed_array (
      JSCContext* context,
      JSCTypedArrayType type,
      gsize length
    )

#### Description [src]

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`.

Available since: 2.38

#### Parameters

`context`

  Type: `JSCContext`

  A `JSCContext`.

  The data is owned by the caller of the function.

`type`

  Type: `JSCTypedArrayType`

  The type of array elements.

`length`

  Type: `gsize`

  Number of elements in the array.

#### Return value

Type: `JSCValue`

A `JSCValue`.

The caller of the function takes ownership of the data, and is responsible for freeing it.