From ac6000d0fd9c49b87748e6a3a1e2b83479b4b0a2 Mon Sep 17 00:00:00 2001 From: Yohei Kishimoto Date: Wed, 17 Jul 2019 06:38:10 +0900 Subject: [PATCH] doc: fix minor typo PR-URL: https://github.com/nodejs/node-addon-api/pull/510 Reviewed-By: Gabriel Schulhof Reviewed-By: NickNaso Reviewed-By: Michael Dawson --- doc/async_worker.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/async_worker.md b/doc/async_worker.md index 0516af8f6..0c641c66f 100644 --- a/doc/async_worker.md +++ b/doc/async_worker.md @@ -79,7 +79,7 @@ the `Napi::AsyncWorker::OnOK` callback. Sets the error message for the error that happened during the execution. Setting an error message will cause the `Napi::AsyncWorker::OnError` method to be -invoked instead of `Napi::AsyncWorker::OnOKOnOK` once the +invoked instead of `Napi::AsyncWorker::OnOK` once the `Napi::AsyncWorker::Execute` method completes. ```cpp @@ -115,7 +115,7 @@ virtual void Napi::AsyncWorker::OnOK(); ### OnError -This method is invoked afer `Napi::AsyncWorker::Execute` completes if an error +This method is invoked after `Napi::AsyncWorker::Execute` completes if an error occurs while `Napi::AsyncWorker::Execute` is running and C++ exceptions are enabled or if an error was set through a call to `Napi::AsyncWorker::SetError`. The default implementation calls the callback provided when the `Napi::AsyncWorker` @@ -208,7 +208,7 @@ calling `Napi::AsyncWork::Queue`. Creates a new `Napi::AsyncWorker`. ```cpp -explicit Napi::AsyncWorker(const Napi::Object& receiver, const Napi::Function& callback,const char* resource_name); +explicit Napi::AsyncWorker(const Napi::Object& receiver, const Napi::Function& callback, const char* resource_name); ``` - `[in] receiver`: The `this` object passed to the called function. @@ -361,7 +361,7 @@ the work on the `Napi::AsyncWorker::Execute` method is done the `Napi::AsyncWorker::OnOk` method is called and the results return back to JavaScript invoking the stored callback with its associated environment. -The following code shows an example on how to create and and use an `Napi::AsyncWorker` +The following code shows an example on how to create and use an `Napi::AsyncWorker` ```cpp #include