Skip to content

Commit

Permalink
docs: fix typos (#1068)
Browse files Browse the repository at this point in the history
  • Loading branch information
todoroff authored Sep 14, 2021
1 parent 22a2f3c commit 76de4d8
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions doc/async_worker_variants.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,9 +417,9 @@ void Napi::AsyncProgressQueueWorker::ExecutionProcess::Send(const T* data, size_
## Example
The code below show an example of the `Napi::AsyncProgressQueueWorker` implementation, but
also demonsrates how to use multiple `Napi::Function`'s if you wish to provide multiple
callback functions for more object oriented code:
The code below shows an example of the `Napi::AsyncProgressQueueWorker` implementation, but
also demonstrates how to use multiple `Napi::Function`'s if you wish to provide multiple
callback functions for more object-oriented code:
```cpp
#include <napi.h>
Expand Down
6 changes: 3 additions & 3 deletions doc/error_handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ The following sections explain the approach for each case:

<a name="exceptions"></a>

In most cases when an error occurs, the addon should do whatever clean is possible
and then return to JavaScript so that they error can be propagated. In less frequent
In most cases when an error occurs, the addon should do whatever cleanup is possible
and then return to JavaScript so that the error can be propagated. In less frequent
cases the addon may be able to recover from the error, clear the error and then
continue.

Expand All @@ -39,7 +39,7 @@ the error as a C++ exception of type `Napi::Error`.

If a JavaScript function called by C++ code via node-addon-api throws a JavaScript
exception, then node-addon-api automatically converts and throws it as a C++
exception of type `Napi:Error` on return from the JavaScript code to the native
exception of type `Napi::Error` on return from the JavaScript code to the native
method.

If a C++ exception of type `Napi::Error` escapes from a Node-API C++ callback, then
Expand Down
2 changes: 1 addition & 1 deletion doc/escapable_handle_scope.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ For more details refer to the section titled
Creates a new escapable handle scope.

```cpp
Napi::EscapableHandleScope Napi::EscapableHandleScope::New(Napi:Env env);
Napi::EscapableHandleScope Napi::EscapableHandleScope::New(Napi::Env env);
```
- `[in] Env`: The environment in which to construct the `Napi::EscapableHandleScope` object.
Expand Down
4 changes: 2 additions & 2 deletions doc/object.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ The `Napi::Object::Freeze()` method freezes an object. A frozen object can no
longer changed. Freezing an object prevents new properties from being added to
it, existing properties from being removed, prevents changing the
enumerability, configurability, or writability of existing properties and
prevents the valuee of existing properties from being changed. In addition,
prevents the value of existing properties from being changed. In addition,
freezing an object also prevents its prototype from being changed.

### Seal()
Expand All @@ -238,7 +238,7 @@ void Napi::Object::Seal()

The `Napi::Object::Seal()` method seals an object, preventing new properties
from being added to it and marking all existing properties as non-configurable.
Values of present properties can still be changed as long as thery are
Values of present properties can still be changed as long as they are
writable.

### operator\[\]()
Expand Down
12 changes: 6 additions & 6 deletions doc/object_wrap.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticMethod(Symbol name,
void* data = nullptr);
```

- `[in] name`: Napi:Symbol that represents the name of a static
- `[in] name`: Napi::Symbol that represents the name of a static
method for the class.
- `[in] method`: The native function that represents a static method of a
JavaScript class.
Expand All @@ -308,7 +308,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticMethod(Symbol name,
```
method for the class.
- `[in] name`: Napi:Symbol that represents the name of a static.
- `[in] name`: Napi::Symbol that represents the name of a static.
- `[in] method`: The native function that represents a static method of a
JavaScript class.
- `[in] attributes`: The attributes associated with a particular property.
Expand Down Expand Up @@ -380,7 +380,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticMethod(Symbol name,

- `[in] method`: The native function that represents a static method of a
JavaScript class.
- `[in] name`: Napi:Symbol that represents the name of a static
- `[in] name`: Napi::Symbol that represents the name of a static
method for the class.
- `[in] attributes`: The attributes associated with a particular property.
One or more of `napi_property_attributes`.
Expand All @@ -403,7 +403,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticMethod(Symbol name,
- `[in] method`: The native function that represents a static method of a
JavaScript class.
- `[in] name`: Napi:Symbol that represents the name of a static.
- `[in] name`: Napi::Symbol that represents the name of a static.
- `[in] attributes`: The attributes associated with a particular property.
One or more of `napi_property_attributes`.
- `[in] data`: User-provided data passed into method when it is invoked.
Expand Down Expand Up @@ -452,7 +452,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticAccessor(Symbol name,
void* data = nullptr);
```
- `[in] name`: Napi:Symbol that represents the name of a static accessor.
- `[in] name`: Napi::Symbol that represents the name of a static accessor.
- `[in] getter`: The native function to call when a get access to the property
of a JavaScript class is performed.
- `[in] setter`: The native function to call when a set access to the property
Expand Down Expand Up @@ -508,7 +508,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticAccessor(Symbol name,
of a JavaScript class is performed.
- `[in] setter`: The native function to call when a set access to the property
of a JavaScript class is performed.
- `[in] name`: Napi:Symbol that represents the name of a static accessor.
- `[in] name`: Napi::Symbol that represents the name of a static accessor.
- `[in] attributes`: The attributes associated with a particular property.
One or more of `napi_property_attributes`.
- `[in] data`: User-provided data passed into getter or setter when
Expand Down
4 changes: 2 additions & 2 deletions doc/type_error.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ For more details about error handling refer to the section titled [Error handlin
Creates a new instance of the `Napi::TypeError` object.

```cpp
Napi::TypeError::New(Napi:Env env, const char* message);
Napi::TypeError::New(Napi::Env env, const char* message);
```
- `[in] Env`: The environment in which to construct the `Napi::TypeError` object.
Expand All @@ -29,7 +29,7 @@ Returns an instance of a `Napi::TypeError` object.
Creates a new instance of a `Napi::TypeError` object.
```cpp
Napi::TypeError::New(Napi:Env env, const std::string& message);
Napi::TypeError::New(Napi::Env env, const std::string& message);
```

- `[in] Env`: The environment in which to construct the `Napi::TypeError` object.
Expand Down
8 changes: 4 additions & 4 deletions doc/typed_threadsafe_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ New(napi_env env,
- `initialThreadCount`: The initial number of threads, including the main
thread, which will be making use of this function.
- `[optional] context`: Data to attach to the resulting `ThreadSafeFunction`. It
can be retreived via `GetContext()`.
can be retrieved via `GetContext()`.
- `[optional] finalizeCallback`: Function to call when the
`TypedThreadSafeFunction` is being destroyed. This callback will be invoked
on the main thread when the thread-safe function is about to be destroyed. It
Expand Down Expand Up @@ -130,7 +130,7 @@ napi_status Napi::TypedThreadSafeFunction<ContextType, DataType, Callback>::Rele
Returns one of:
- `napi_ok`: The thread-safe function has been successfully released.
- `napi_invalid_arg`: The thread-safe function's thread-count is zero.
- `napi_generic_failure`: A generic error occurred when attemping to release the
- `napi_generic_failure`: A generic error occurred when attempting to release the
thread-safe function.

### Abort
Expand All @@ -152,7 +152,7 @@ napi_status Napi::TypedThreadSafeFunction<ContextType, DataType, Callback>::Abor
Returns one of:
- `napi_ok`: The thread-safe function has been successfully aborted.
- `napi_invalid_arg`: The thread-safe function's thread-count is zero.
- `napi_generic_failure`: A generic error occurred when attemping to abort the
- `napi_generic_failure`: A generic error occurred when attempting to abort the
thread-safe function.

### BlockingCall / NonBlockingCall
Expand Down Expand Up @@ -180,7 +180,7 @@ Returns one of:
- `napi_closing`: The thread-safe function is aborted and no further calls can
be made.
- `napi_invalid_arg`: The thread-safe function is closed.
- `napi_generic_failure`: A generic error occurred when attemping to add to the
- `napi_generic_failure`: A generic error occurred when attempting to add to the
queue.


Expand Down

0 comments on commit 76de4d8

Please sign in to comment.