Integral status code indicating the success or failure of a N-API call. Currently, the following status codes are supported.

    1. typedef enum {
    2. napi_ok,
    3. napi_invalid_arg,
    4. napi_object_expected,
    5. napi_string_expected,
    6. napi_name_expected,
    7. napi_function_expected,
    8. napi_number_expected,
    9. napi_boolean_expected,
    10. napi_array_expected,
    11. napi_generic_failure,
    12. napi_pending_exception,
    13. napi_cancelled,
    14. napi_escape_called_twice,
    15. napi_handle_scope_mismatch,
    16. napi_callback_scope_mismatch,
    17. napi_queue_full,
    18. napi_closing,
    19. napi_bigint_expected,
    20. napi_date_expected,
    21. napi_arraybuffer_expected,
    22. napi_detachable_arraybuffer_expected,
    23. napi_would_deadlock, /* unused */
    24. } napi_status;

    If additional information is required upon an API returning a failed status, it can be obtained by calling napi_get_last_error_info.