Skip to content

Commit

Permalink
doc: fix minor typo
Browse files Browse the repository at this point in the history
PR-URL: #510
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: NickNaso <nicoladelgobbo@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
  • Loading branch information
morokosi authored and mhdawson committed Jul 16, 2019
1 parent e9fa1ea commit ac6000d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions doc/async_worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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`
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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<napi.h>
Expand Down

0 comments on commit ac6000d

Please sign in to comment.