Available on crate feature
napi only.Structs§
- napi_
async_ cleanup_ hook_ handle__ - napi_
async_ context__ - napi_
async_ work__ - napi_
callback_ info__ - napi_
callback_ scope__ - napi_
deferred__ - napi_
escapable_ handle_ scope__ - napi_
event_ mode api-12 - Indicates the running mode of the native event loop in an asynchronous native thread.
- napi_
extended_ error_ info - napi_
handle_ scope__ - napi_
key_ collection_ mode - napi_
key_ conversion - napi_
key_ filter - napi_
module - napi_
node_ version - napi_
property_ attributes - napi_
property_ descriptor - napi_
qos_ t - napi_
ref__ - napi_
status - napi_
task_ priority api-12 - Indicates the priority of a task dispatched from native thread to ArkTS thread.
- napi_
threadsafe_ function__ - napi_
threadsafe_ function_ call_ mode - napi_
threadsafe_ function_ release_ mode - napi_
type_ tag - napi_
typedarray_ type - napi_
valuetype - uv_
loop_ s
Constants§
Functions§
- napi_
acquire_ ⚠threadsafe_ function - napi_
add_ ⚠async_ cleanup_ hook api-11 - Registers an asynchronous clean-up hook for releasing resources when the environment exits.
- napi_
add_ ⚠env_ cleanup_ hook api-11 - Registers a clean-up hook for releasing resources when the environment exits.
- napi_
add_ ⚠finalizer api-11 - Adds a ‘napi_finalize’ callback, which will be called when the ArkTS object is garbage-collected.
- napi_
adjust_ ⚠external_ memory - napi_
async_ ⚠destroy api-11 - Destroys the previously created asynchronous context. The capabilities related to ‘async_hook’ are not supported currently.
- napi_
async_ ⚠init api-11 - Creates an asynchronous context. The capabilities related to ‘async_hook’ are not supported currently.
- napi_
call_ ⚠function - napi_
call_ ⚠threadsafe_ function - napi_
call_ ⚠threadsafe_ function_ with_ priority api-12 - Dispatch a task with specified priority from a native thread to an ArkTS thread, the task will execute the given thread safe function.
- napi_
cancel_ ⚠async_ work - napi_
check_ ⚠object_ type_ tag - napi_
close_ ⚠callback_ scope api-11 - Closes the callback scope. The capabilities related to ‘async_hook’ are not supported currently.
- napi_
close_ ⚠escapable_ handle_ scope - napi_
close_ ⚠handle_ scope - napi_
coerce_ ⚠to_ bool - napi_
coerce_ ⚠to_ native_ binding_ object api-11 - This API sets native properties to a object and converts this js object to native binding object.
- napi_
coerce_ ⚠to_ number - napi_
coerce_ ⚠to_ object - napi_
coerce_ ⚠to_ string - napi_
create_ ⚠ark_ runtime api-12 - Create the ark runtime.
- napi_
create_ ⚠array - napi_
create_ ⚠array_ with_ length - napi_
create_ ⚠arraybuffer - napi_
create_ ⚠async_ work - napi_
create_ ⚠bigint_ int64 - napi_
create_ ⚠bigint_ uint64 - napi_
create_ ⚠bigint_ words - napi_
create_ ⚠buffer - Creates a ArkTS buffer of the specified size.
- napi_
create_ ⚠buffer_ copy - napi_
create_ ⚠dataview - napi_
create_ ⚠date - napi_
create_ ⚠double - napi_
create_ ⚠error - napi_
create_ ⚠external - napi_
create_ ⚠external_ arraybuffer - napi_
create_ ⚠external_ buffer - napi_
create_ ⚠function - napi_
create_ ⚠int32 - napi_
create_ ⚠int64 - napi_
create_ ⚠object - napi_
create_ ⚠object_ with_ named_ properties api-11 - Create JSObject with initial properties given by keys and values, note that property key must be String, and must can not convert to element_index, also all keys must not duplicate.
- napi_
create_ ⚠object_ with_ properties api-11 - Create JSObject with initial properties given by descriptors, note that property key must be String, and must can not convert to element_index, also all keys must not duplicate.
- napi_
create_ ⚠promise - napi_
create_ ⚠range_ error - napi_
create_ ⚠reference - napi_
create_ ⚠sendable_ array api-12 - Create a sendable array.
- napi_
create_ ⚠sendable_ array_ with_ length api-12 - Create a sendable array with length.
- napi_
create_ ⚠sendable_ arraybuffer api-12 - Create a sendable arraybuffer.
- napi_
create_ ⚠sendable_ object_ with_ properties api-12 - Defines a sendable object.
- napi_
create_ ⚠sendable_ typedarray api-12 - Create a sendable typedarray.
- napi_
create_ ⚠string_ latin1 - napi_
create_ ⚠string_ utf8 - napi_
create_ ⚠string_ utf16 - napi_
create_ ⚠symbol - napi_
create_ ⚠threadsafe_ function - napi_
create_ ⚠type_ error - napi_
create_ ⚠typedarray - napi_
create_ ⚠uint32 - napi_
define_ ⚠class - napi_
define_ ⚠properties - napi_
define_ ⚠sendable_ class api-12 - Defines a sendable class.
- napi_
delete_ ⚠async_ work - napi_
delete_ ⚠element - napi_
delete_ ⚠property - napi_
delete_ ⚠reference - napi_
delete_ ⚠serialization_ data api-12 - Delete serialization data.
- napi_
deserialize ⚠api-12 - Restore serialization data to a ArkTS object.
- napi_
destroy_ ⚠ark_ runtime api-12 - Destroy the ark runtime.
- napi_
detach_ ⚠arraybuffer - napi_
escape_ ⚠handle - napi_
fatal_ ⚠error - napi_
fatal_ ⚠exception api-12 - Throws UncaughtException to ArkTS.
- napi_
get_ ⚠all_ property_ names - napi_
get_ ⚠and_ clear_ last_ exception - napi_
get_ ⚠array_ length - napi_
get_ ⚠arraybuffer_ info - napi_
get_ ⚠boolean - napi_
get_ ⚠buffer_ info - napi_
get_ ⚠cb_ info - napi_
get_ ⚠dataview_ info - napi_
get_ ⚠date_ value - napi_
get_ ⚠element - napi_
get_ ⚠global - napi_
get_ ⚠instance_ data api-11 - Retrieves the data that was previously associated with the currently running environment.
- napi_
get_ ⚠last_ error_ info - napi_
get_ ⚠named_ property - napi_
get_ ⚠new_ target - napi_
get_ ⚠node_ version - napi_
get_ ⚠null - napi_
get_ ⚠property - napi_
get_ ⚠property_ names - napi_
get_ ⚠prototype - napi_
get_ ⚠reference_ value - napi_
get_ ⚠threadsafe_ function_ context - napi_
get_ ⚠typedarray_ info - napi_
get_ ⚠undefined - napi_
get_ ⚠uv_ event_ loop - napi_
get_ ⚠value_ bigint_ int64 - napi_
get_ ⚠value_ bigint_ uint64 - napi_
get_ ⚠value_ bigint_ words - napi_
get_ ⚠value_ bool - napi_
get_ ⚠value_ double - napi_
get_ ⚠value_ external - napi_
get_ ⚠value_ int32 - napi_
get_ ⚠value_ int64 - napi_
get_ ⚠value_ string_ latin1 - napi_
get_ ⚠value_ string_ utf8 - napi_
get_ ⚠value_ string_ utf16 - napi_
get_ ⚠value_ uint32 - napi_
get_ ⚠version - napi_
has_ ⚠element - napi_
has_ ⚠named_ property - napi_
has_ ⚠own_ property - napi_
has_ ⚠property - napi_
instanceof ⚠ - napi_
is_ ⚠array - napi_
is_ ⚠arraybuffer - napi_
is_ ⚠buffer - napi_
is_ ⚠dataview - napi_
is_ ⚠date - napi_
is_ ⚠detached_ arraybuffer - napi_
is_ ⚠error - napi_
is_ ⚠exception_ pending - napi_
is_ ⚠promise - napi_
is_ ⚠sendable api-12 - Queries a napi_value to check if it is sendable.
- napi_
is_ ⚠typedarray - napi_
load_ ⚠module api-11 - Loads an .abc file as a module. This API returns the namespace of the module.
- napi_
load_ ⚠module_ with_ info api-12 - The module is loaded through the NAPI. By default, the default object is exported from the module.
- napi_
make_ ⚠callback api-11 - Allows a JS function to be called in the asynchronous context. The capabilities related to async_hook are not supported currently.
- napi_
module_ ⚠register - napi_
new_ ⚠instance - napi_
object_ ⚠freeze - napi_
object_ ⚠seal - napi_
open_ ⚠callback_ scope api-11 - Opens a callback scope. The capabilities related to ‘async_hook’ are not supported currently.
- napi_
open_ ⚠escapable_ handle_ scope - napi_
open_ ⚠handle_ scope - napi_
queue_ ⚠async_ work - napi_
queue_ ⚠async_ work_ with_ qos - napi_
ref_ ⚠threadsafe_ function - napi_
reference_ ⚠ref - napi_
reference_ ⚠unref - napi_
reject_ ⚠deferred - napi_
release_ ⚠threadsafe_ function - napi_
remove_ ⚠async_ cleanup_ hook api-11 - Unregisters the asynchronous clean-up hook.
- napi_
remove_ ⚠env_ cleanup_ hook api-11 - Unregisters the clean-up hook.
- napi_
remove_ ⚠wrap - napi_
remove_ ⚠wrap_ sendable api-12 - Retrieves a native instance that was previously wrapped in a ArkTS object and removes the wrapping.
- napi_
resolve_ ⚠deferred - napi_
run_ ⚠event_ loop api-12 - Run the event loop by the given env and running mode in current thread.
- napi_
run_ ⚠script - napi_
run_ ⚠script_ path - napi_
serialize ⚠api-12 - Serialize a JS object.
- napi_
set_ ⚠element - napi_
set_ ⚠instance_ data api-11 - Associates data with the currently running environment.
- napi_
set_ ⚠named_ property - napi_
set_ ⚠property - napi_
stop_ ⚠event_ loop api-12 - Stop the event loop in current thread.
- napi_
strict_ ⚠equals - napi_
throw ⚠ - napi_
throw_ ⚠error - napi_
throw_ ⚠range_ error - napi_
throw_ ⚠type_ error - napi_
type_ ⚠tag_ object - napi_
typeof ⚠ - napi_
unref_ ⚠threadsafe_ function - napi_
unwrap ⚠ - napi_
unwrap_ ⚠sendable api-12 - Retrieves a native instance that was previously wrapped in a ArkTS object.
- napi_
wrap ⚠ - napi_
wrap_ ⚠sendable api-12 - Wraps a native instance in a ArkTS object.
- napi_
wrap_ ⚠sendable_ with_ size api-12 - Wraps a native instance in a ArkTS object.
- node_
api_ ⚠get_ module_ file_ name api-11 - Obtains the absolute path of the location, from which the addon is loaded.
Type Aliases§
- char16_
t - napi_
addon_ register_ func - napi_
async_ cleanup_ hook - napi_
async_ cleanup_ hook_ handle - napi_
async_ complete_ callback - napi_
async_ context - napi_
async_ execute_ callback - napi_
async_ work - napi_
callback - napi_
callback_ info - napi_
callback_ scope - napi_
deferred - napi_
env - napi_
escapable_ handle_ scope - napi_
finalize - napi_
handle_ scope - napi_
native_ binding_ attach_ callback api-11 - Native attach callback of napi_coerce_to_native_binding_object that can be used to bind the js object and the native object.
- napi_
native_ binding_ detach_ callback api-11 - Native detach callback of napi_coerce_to_native_binding_object that can be used to detach the js object and the native object.
- napi_
ref - napi_
threadsafe_ function - napi_
threadsafe_ function_ call_ js - napi_
value