doc: fix optional parameters in n-api.md

The thread_finalize_data and thread_finalize_cb parameters in
napi_create_threadsafe_function are optional.

PR-URL: https://github.com/nodejs/node/pull/22998
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
Lars-Magnus Skog 2018-09-21 16:17:38 +02:00 committed by Anna Henningsen
parent 4e09fc3359
commit 357aeaad62
No known key found for this signature in database
GPG Key ID: 9C63F3A6CD2AD8F9

View File

@ -4447,8 +4447,8 @@ by the `async_hooks` API.
- `[in] max_queue_size`: Maximum size of the queue. `0` for no limit.
- `[in] initial_thread_count`: The initial number of threads, including the main
thread, which will be making use of this function.
- `[in] thread_finalize_data`: Data to be passed to `thread_finalize_cb`.
- `[in] thread_finalize_cb`: Function to call when the
- `[in] thread_finalize_data`: Optional data to be passed to `thread_finalize_cb`.
- `[in] thread_finalize_cb`: Optional function to call when the
`napi_threadsafe_function` is being destroyed.
- `[in] context`: Optional data to attach to the resulting
`napi_threadsafe_function`.