pub unsafe extern "C" fn napi_define_sendable_class(
env: napi_env,
utf8name: *const c_char,
length: usize,
constructor: napi_callback,
data: *mut c_void,
property_count: usize,
properties: *const napi_property_descriptor,
parent: napi_value,
result: *mut napi_value,
) -> napi_statusnapi and api-12 only.Expand description
Defines a sendable class.
§Arguments
-
env- The environment that the API is invoked under. -
utf8name- Name of the ArkTS constructor function. -
length- The length of the utf8name in bytes, or NAPI_AUTO_LENGTH if it is null-terminated. -
constructor- Callback function that handles constructing instances of the class. -
data- Optional data to be passed to the constructor callback as the data property of the callback info. -
property_count- Number of items in the properties array argument. -
properties- Array of property descriptors describing static and instance data properties, accessors, and methods on the class. See napi_property_descriptor. -
parent- A napi_value representing the Superclass. -
result- A napi_value representing the constructor function for the class.
§Returns
- Return the function execution status.
Available since API-level: 12