The method Object::GetPropertyNames() is not declared const.
The method napi_get_property_names() cannot not modify any member fields as the variables _env and _value are passed by value and result is a local variable. Thus, the function should be declared as const.
This will add the ability to declare a const Object and still get the property names associated with the object.
The method
Object::GetPropertyNames()is not declaredconst.The method
napi_get_property_names()cannot not modify any member fields as the variables_envand_valueare passed by value andresultis a local variable. Thus, the function should be declared asconst.This will add the ability to declare a
const Objectand still get the property names associated with the object.