1. typedef enum {
    2. // ES6 types (corresponds to typeof)
    3. napi_undefined,
    4. napi_null,
    5. napi_boolean,
    6. napi_number,
    7. napi_string,
    8. napi_symbol,
    9. napi_object,
    10. napi_function,
    11. napi_external,
    12. napi_bigint,
    13. } napi_valuetype;

    Describes the type of a napi_value. This generally corresponds to the types described in [Section 6.1][] of the ECMAScript Language Specification. In addition to types in that section, napi_valuetype can also represent Functions and Objects with external data.

    A JavaScript value of type napi_external appears in JavaScript as a plain object such that no properties can be set on it, and no prototype.