Skip to content

Commit 76de4d8

Browse files
authored
docs: fix typos (#1068)
1 parent 22a2f3c commit 76de4d8

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

doc/async_worker_variants.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,9 +417,9 @@ void Napi::AsyncProgressQueueWorker::ExecutionProcess::Send(const T* data, size_
417417
418418
## Example
419419
420-
The code below show an example of the `Napi::AsyncProgressQueueWorker` implementation, but
421-
also demonsrates how to use multiple `Napi::Function`'s if you wish to provide multiple
422-
callback functions for more object oriented code:
420+
The code below shows an example of the `Napi::AsyncProgressQueueWorker` implementation, but
421+
also demonstrates how to use multiple `Napi::Function`'s if you wish to provide multiple
422+
callback functions for more object-oriented code:
423423
424424
```cpp
425425
#include <napi.h>

doc/error_handling.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ The following sections explain the approach for each case:
2222

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

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

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

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

4545
If a C++ exception of type `Napi::Error` escapes from a Node-API C++ callback, then

doc/escapable_handle_scope.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ For more details refer to the section titled
2020
Creates a new escapable handle scope.
2121

2222
```cpp
23-
Napi::EscapableHandleScope Napi::EscapableHandleScope::New(Napi:Env env);
23+
Napi::EscapableHandleScope Napi::EscapableHandleScope::New(Napi::Env env);
2424
```
2525
2626
- `[in] Env`: The environment in which to construct the `Napi::EscapableHandleScope` object.

doc/object.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ The `Napi::Object::Freeze()` method freezes an object. A frozen object can no
227227
longer changed. Freezing an object prevents new properties from being added to
228228
it, existing properties from being removed, prevents changing the
229229
enumerability, configurability, or writability of existing properties and
230-
prevents the valuee of existing properties from being changed. In addition,
230+
prevents the value of existing properties from being changed. In addition,
231231
freezing an object also prevents its prototype from being changed.
232232

233233
### Seal()
@@ -238,7 +238,7 @@ void Napi::Object::Seal()
238238

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

244244
### operator\[\]()

doc/object_wrap.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticMethod(Symbol name,
284284
void* data = nullptr);
285285
```
286286

287-
- `[in] name`: Napi:Symbol that represents the name of a static
287+
- `[in] name`: Napi::Symbol that represents the name of a static
288288
method for the class.
289289
- `[in] method`: The native function that represents a static method of a
290290
JavaScript class.
@@ -308,7 +308,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticMethod(Symbol name,
308308
```
309309
310310
method for the class.
311-
- `[in] name`: Napi:Symbol that represents the name of a static.
311+
- `[in] name`: Napi::Symbol that represents the name of a static.
312312
- `[in] method`: The native function that represents a static method of a
313313
JavaScript class.
314314
- `[in] attributes`: The attributes associated with a particular property.
@@ -380,7 +380,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticMethod(Symbol name,
380380

381381
- `[in] method`: The native function that represents a static method of a
382382
JavaScript class.
383-
- `[in] name`: Napi:Symbol that represents the name of a static
383+
- `[in] name`: Napi::Symbol that represents the name of a static
384384
method for the class.
385385
- `[in] attributes`: The attributes associated with a particular property.
386386
One or more of `napi_property_attributes`.
@@ -403,7 +403,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticMethod(Symbol name,
403403
404404
- `[in] method`: The native function that represents a static method of a
405405
JavaScript class.
406-
- `[in] name`: Napi:Symbol that represents the name of a static.
406+
- `[in] name`: Napi::Symbol that represents the name of a static.
407407
- `[in] attributes`: The attributes associated with a particular property.
408408
One or more of `napi_property_attributes`.
409409
- `[in] data`: User-provided data passed into method when it is invoked.
@@ -452,7 +452,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticAccessor(Symbol name,
452452
void* data = nullptr);
453453
```
454454
455-
- `[in] name`: Napi:Symbol that represents the name of a static accessor.
455+
- `[in] name`: Napi::Symbol that represents the name of a static accessor.
456456
- `[in] getter`: The native function to call when a get access to the property
457457
of a JavaScript class is performed.
458458
- `[in] setter`: The native function to call when a set access to the property
@@ -508,7 +508,7 @@ static Napi::PropertyDescriptor Napi::ObjectWrap::StaticAccessor(Symbol name,
508508
of a JavaScript class is performed.
509509
- `[in] setter`: The native function to call when a set access to the property
510510
of a JavaScript class is performed.
511-
- `[in] name`: Napi:Symbol that represents the name of a static accessor.
511+
- `[in] name`: Napi::Symbol that represents the name of a static accessor.
512512
- `[in] attributes`: The attributes associated with a particular property.
513513
One or more of `napi_property_attributes`.
514514
- `[in] data`: User-provided data passed into getter or setter when

doc/type_error.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ For more details about error handling refer to the section titled [Error handlin
1616
Creates a new instance of the `Napi::TypeError` object.
1717

1818
```cpp
19-
Napi::TypeError::New(Napi:Env env, const char* message);
19+
Napi::TypeError::New(Napi::Env env, const char* message);
2020
```
2121
2222
- `[in] Env`: The environment in which to construct the `Napi::TypeError` object.
@@ -29,7 +29,7 @@ Returns an instance of a `Napi::TypeError` object.
2929
Creates a new instance of a `Napi::TypeError` object.
3030
3131
```cpp
32-
Napi::TypeError::New(Napi:Env env, const std::string& message);
32+
Napi::TypeError::New(Napi::Env env, const std::string& message);
3333
```
3434

3535
- `[in] Env`: The environment in which to construct the `Napi::TypeError` object.

doc/typed_threadsafe_function.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ New(napi_env env,
7373
- `initialThreadCount`: The initial number of threads, including the main
7474
thread, which will be making use of this function.
7575
- `[optional] context`: Data to attach to the resulting `ThreadSafeFunction`. It
76-
can be retreived via `GetContext()`.
76+
can be retrieved via `GetContext()`.
7777
- `[optional] finalizeCallback`: Function to call when the
7878
`TypedThreadSafeFunction` is being destroyed. This callback will be invoked
7979
on the main thread when the thread-safe function is about to be destroyed. It
@@ -130,7 +130,7 @@ napi_status Napi::TypedThreadSafeFunction<ContextType, DataType, Callback>::Rele
130130
Returns one of:
131131
- `napi_ok`: The thread-safe function has been successfully released.
132132
- `napi_invalid_arg`: The thread-safe function's thread-count is zero.
133-
- `napi_generic_failure`: A generic error occurred when attemping to release the
133+
- `napi_generic_failure`: A generic error occurred when attempting to release the
134134
thread-safe function.
135135

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

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

186186

0 commit comments

Comments
 (0)