You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.4 KiB
1.4 KiB
Symbol
Methods
Constructor
Instantiates a new Napi::Symbol value.
Napi::Symbol::Symbol();
Returns a new empty Napi::Symbol.
New
Napi::Symbol::New(napi_env env, const std::string& description);
Napi::Symbol::New(napi_env env, const char* description);
Napi::Symbol::New(napi_env env, Napi::String description);
Napi::Symbol::New(napi_env env, napi_value description);
[in] env: Thenapi_envenvironment in which to construct theNapi::Symbolobject.[in] value: The C++ primitive which represents the description hint for theNapi::Symbol.descriptionmay be any of:std::string&- ANSI string description.const char*- represents a UTF8 string description.String- Node addon API String description.napi_value- N-APInapi_valuedescription.
If an error occurs, a Napi::Error will get thrown. If C++ exceptions are not
being used, callers should check the result of Napi::Env::IsExceptionPending before
attempting to use the returned value.
Utf8Value
static Napi::Symbol Napi::Symbol::WellKnown(napi_env env, const std::string& name);
[in] env: Thenapi_envenvironment in which to construct theNapi::Symbolobject.[in] name: The C++ string representing theNapi::Symbolto retrieve.
Returns a Napi::Symbol representing a well-known Symbol from the
Symbol registry.