diff --git a/doc/async_worker_variants.md b/doc/async_worker_variants.md index 4f1762177..591cd8a57 100644 --- a/doc/async_worker_variants.md +++ b/doc/async_worker_variants.md @@ -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 diff --git a/doc/error_handling.md b/doc/error_handling.md index 57de85c9e..642c223e5 100644 --- a/doc/error_handling.md +++ b/doc/error_handling.md @@ -22,8 +22,8 @@ The following sections explain the approach for each case: -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. @@ -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 diff --git a/doc/escapable_handle_scope.md b/doc/escapable_handle_scope.md index a58942a79..faf4b5b47 100644 --- a/doc/escapable_handle_scope.md +++ b/doc/escapable_handle_scope.md @@ -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. diff --git a/doc/object.md b/doc/object.md index 06b19f9f1..9830675a7 100644 --- a/doc/object.md +++ b/doc/object.md @@ -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() @@ -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\[\]() diff --git a/doc/object_wrap.md b/doc/object_wrap.md index da07448d9..d90da42c4 100644 --- a/doc/object_wrap.md +++ b/doc/object_wrap.md @@ -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. @@ -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. @@ -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`. @@ -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. @@ -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 @@ -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 diff --git a/doc/type_error.md b/doc/type_error.md index 24bbf8eda..439a306ee 100644 --- a/doc/type_error.md +++ b/doc/type_error.md @@ -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. @@ -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. diff --git a/doc/typed_threadsafe_function.md b/doc/typed_threadsafe_function.md index 33c490e87..496c952b5 100644 --- a/doc/typed_threadsafe_function.md +++ b/doc/typed_threadsafe_function.md @@ -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 @@ -130,7 +130,7 @@ napi_status Napi::TypedThreadSafeFunction::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 @@ -152,7 +152,7 @@ napi_status Napi::TypedThreadSafeFunction::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 @@ -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.