Skip to content

Commit ac6000d

Browse files
morokosimhdawson
authored andcommitted
doc: fix minor typo
PR-URL: #510 Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: NickNaso <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent e9fa1ea commit ac6000d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/async_worker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ the `Napi::AsyncWorker::OnOK` callback.
7979

8080
Sets the error message for the error that happened during the execution. Setting
8181
an error message will cause the `Napi::AsyncWorker::OnError` method to be
82-
invoked instead of `Napi::AsyncWorker::OnOKOnOK` once the
82+
invoked instead of `Napi::AsyncWorker::OnOK` once the
8383
`Napi::AsyncWorker::Execute` method completes.
8484

8585
```cpp
@@ -115,7 +115,7 @@ virtual void Napi::AsyncWorker::OnOK();
115115

116116
### OnError
117117

118-
This method is invoked afer `Napi::AsyncWorker::Execute` completes if an error
118+
This method is invoked after `Napi::AsyncWorker::Execute` completes if an error
119119
occurs while `Napi::AsyncWorker::Execute` is running and C++ exceptions are
120120
enabled or if an error was set through a call to `Napi::AsyncWorker::SetError`.
121121
The default implementation calls the callback provided when the `Napi::AsyncWorker`
@@ -208,7 +208,7 @@ calling `Napi::AsyncWork::Queue`.
208208
Creates a new `Napi::AsyncWorker`.
209209

210210
```cpp
211-
explicit Napi::AsyncWorker(const Napi::Object& receiver, const Napi::Function& callback,const char* resource_name);
211+
explicit Napi::AsyncWorker(const Napi::Object& receiver, const Napi::Function& callback, const char* resource_name);
212212
```
213213
214214
- `[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
361361
`Napi::AsyncWorker::OnOk` method is called and the results return back to
362362
JavaScript invoking the stored callback with its associated environment.
363363

364-
The following code shows an example on how to create and and use an `Napi::AsyncWorker`
364+
The following code shows an example on how to create and use an `Napi::AsyncWorker`
365365

366366
```cpp
367367
#include<napi.h>

0 commit comments

Comments
 (0)