napi_typeof

Function napi_typeof 

Source
pub unsafe extern "C" fn napi_typeof(
    env: napi_env,
    value: napi_value,
    result: *mut napi_valuetype,
) -> napi_status
Available on crate feature napi only.
Expand description

Similar to typeof operation, support external value, detects null as a separate type.

§Arguments

  • env - Current running virtual machine context.

  • value - The ArkTS value whose type expects to query.

  • result - The type of ArkTS value.

§Returns

  • Returns the function execution status. [napi_ok] If the function executed successfully.

[napi_invalid_arg] If the param env, value and(or) result is nullptr.

Available since API-level: 10