diff --git a/doc/api/addons.md b/doc/api/addons.md index e0e00dca0b9e8b..8e2864952e0841 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -72,6 +72,7 @@ namespace demo { using v8::FunctionCallbackInfo; using v8::Isolate; using v8::Local; +using v8::NewStringType; using v8::Object; using v8::String; using v8::Value; @@ -79,7 +80,7 @@ using v8::Value; void Method(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); args.GetReturnValue().Set(String::NewFromUtf8( - isolate, "world").ToLocalChecked()); + isolate, "world", NewStringType::kNormal).ToLocalChecked()); } void Initialize(Local exports) {