pub unsafe fn new_uint8_array(
    ctx: *mut JSContext,
    buf: Vec<u8>
) -> Result<JSValueRef, JsError>
Expand description

create a new TypedArray with a buffer, the buffer is consumed and can be reclaimed later by calling detach_array_buffer_buffer_q

Safety

please ensure that the relevant QuickjsRealmAdapter is not dropped while using this function or a result of this function