Skip to content

Commit a8f6380

Browse files
committed
fix docs
1 parent ec9f521 commit a8f6380

File tree

6 files changed

+19
-17
lines changed

6 files changed

+19
-17
lines changed

doc/array_buffer.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ method will not provide the caller with an opportunity to free the data when the
3737
retained by the `Napi::ArrayBuffer` object please use other variants of the
3838
`Napi::ArrayBuffer::New` factory method that accept `Napi::Finalizer`, which is
3939
a function that will be invoked when the `Napi::ArrayBuffer` object has been
40-
destroyed. See [Finalization]() for more details.
40+
destroyed. See [Finalization][] for more details.
4141
4242
```cpp
4343
static Napi::ArrayBuffer Napi::ArrayBuffer::New(napi_env env, void* externalData, size_t byteLength);
@@ -74,7 +74,7 @@ static Napi::ArrayBuffer Napi::ArrayBuffer::New(napi_env env,
7474
- `[in] byteLength`: The length of the `externalData`, in bytes.
7575
- `[in] finalizeCallback`: A function called when the engine destroys the
7676
`Napi::ArrayBuffer` object, implementing `operator()(Napi::BasicEnv, void*)`.
77-
See [Finalization]() for more details.
77+
See [Finalization][] for more details.
7878
7979
Returns a new `Napi::ArrayBuffer` instance.
8080
@@ -104,7 +104,7 @@ static Napi::ArrayBuffer Napi::ArrayBuffer::New(napi_env env,
104104
- `[in] byteLength`: The length of the `externalData`, in bytes.
105105
- `[in] finalizeCallback`: A function called when the engine destroys the
106106
`Napi::ArrayBuffer` object, implementing `operator()(Napi::BasicEnv, void*,
107-
Hint*)`. See [Finalization]() for more details.
107+
Hint*)`. See [Finalization][] for more details.
108108
- `[in] finalizeHint`: The hint value passed to the `finalizeCallback` function.
109109

110110
Returns a new `Napi::ArrayBuffer` instance.

doc/basic_env.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ or node-addon-api infrastructure.
88

99
The `Napi::BasicEnv` object represents an environment that has a limited subset
1010
of APIs when compared to `Napi::Env` and can be used in basic finalizers. See
11-
[Finalization]() for more details.
11+
[Finalization][] for more details.
1212

1313
## Methods
1414

@@ -122,7 +122,7 @@ inline void PostFinalizer(FinalizerType finalizeCallback) const;
122122
```
123123

124124
- `[in] finalizeCallback`: The function to queue for execution outside of the GC
125-
finalization, implementing `operator()(Napi::Env)`. See [Finalization]() for
125+
finalization, implementing `operator()(Napi::Env)`. See [Finalization][] for
126126
more details.
127127

128128
### PostFinalizer
@@ -133,7 +133,7 @@ inline void PostFinalizer(FinalizerType finalizeCallback, T* data) const;
133133
```
134134
135135
- `[in] finalizeCallback`: The function to queue for execution outside of the GC
136-
finalization, implementing `operator()(Napi::Env, T*)`. See [Finalization]()
136+
finalization, implementing `operator()(Napi::Env, T*)`. See [Finalization][]
137137
for more details.
138138
- `[in] data`: The data to associate with the object.
139139
@@ -148,7 +148,7 @@ inline void PostFinalizer(FinalizerType finalizeCallback,
148148

149149
- `[in] finalizeCallback`: The function to queue for execution outside of the GC
150150
finalization, implementing `operator()(Napi::Env, T*, Hint*)`. See
151-
[Finalization]() for more details.
151+
[Finalization][] for more details.
152152
- `[in] data`: The data to associate with the object.
153153
- `[in] finalizeHint`: The hint value passed to the `finalizeCallback` function.
154154

doc/buffer.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ with an opportunity to free the data when the `Napi::Buffer` gets
3535
garbage-collected. If you need to free the data retained by the `Napi::Buffer`
3636
object please use other variants of the `Napi::Buffer::New` factory method that
3737
accept `Finalizer`, which is a function that will be invoked when the
38-
`Napi::Buffer` object has been destroyed. See [Finalization]() for more details.
38+
`Napi::Buffer` object has been destroyed. See [Finalization][] for more details.
3939
4040
```cpp
4141
static Napi::Buffer<T> Napi::Buffer::New(napi_env env, T* data, size_t length);
@@ -71,7 +71,7 @@ static Napi::Buffer<T> Napi::Buffer::New(napi_env env,
7171
- `[in] length`: The number of `T` elements in the external data.
7272
- `[in] finalizeCallback`: The function called when the engine destroys the
7373
`Napi::Buffer` object, implementing `operator()(Napi::BasicEnv, T*)`. See
74-
[Finalization]() for more details.
74+
[Finalization][] for more details.
7575
7676
Returns a new `Napi::Buffer` object.
7777
@@ -100,7 +100,7 @@ static Napi::Buffer<T> Napi::Buffer::New(napi_env env,
100100
- `[in] length`: The number of `T` elements in the external data.
101101
- `[in] finalizeCallback`: The function called when the engine destroys the
102102
`Napi::Buffer` object, implementing `operator()(Napi::BasicEnv, T*, Hint*)`.
103-
See [Finalization]() for more details.
103+
See [Finalization][] for more details.
104104
- `[in] finalizeHint`: The hint value passed to the `finalizeCallback` function.
105105

106106
Returns a new `Napi::Buffer` object.
@@ -157,7 +157,7 @@ static Napi::Buffer<T> Napi::Buffer::NewOrCopy(napi_env env,
157157
- `[in] length`: The number of `T` elements in the external data.
158158
- `[in] finalizeCallback`: The function called when the engine destroys the
159159
`Napi::Buffer` object, implementing `operator()(Napi::BasicEnv, T*)`. See
160-
[Finalization]() for more details.
160+
[Finalization][] for more details.
161161

162162
Returns a new `Napi::Buffer` object.
163163

@@ -186,7 +186,7 @@ static Napi::Buffer<T> Napi::Buffer::NewOrCopy(napi_env env,
186186
- `[in] length`: The number of `T` elements in the external data.
187187
- `[in] finalizeCallback`: The function called when the engine destroys the
188188
`Napi::Buffer` object, implementing `operator()(Napi::BasicEnv, T*, Hint*)`.
189-
See [Finalization]() for more details.
189+
See [Finalization][] for more details.
190190
- `[in] finalizeHint`: The hint value passed to the `finalizeCallback` function.
191191
192192
Returns a new `Napi::Buffer` object.

doc/env.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ The `Napi::Env` object is usually created and passed by the Node.js runtime or
77
node-addon-api infrastructure.
88

99
The `Napi::Env` object represents an environment that has a superset of APIs
10-
when compared to `Napi::BasicEnv` and therefore _cannot_ be used in basic finalizers.
10+
when compared to `Napi::BasicEnv` and therefore _cannot_ be used in basic
11+
finalizers. See [Finalization][] for more details.
1112

1213
## Methods
1314

@@ -81,3 +82,4 @@ The `script` can be any of the following types:
8182
- `const char *`
8283
- `const std::string &`
8384
85+
[Finalization]: ./finalization.md

doc/external.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The `Napi::External` template class implements the ability to create a `Napi::Va
88
optional Hint value. The `Finalizer` function, if specified, is called when your
99
`Napi::External` object is released by Node's garbage collector. It gives your
1010
code the opportunity to free any dynamically created data. If you specify a Hint
11-
value, it is passed to your `Finalizer` function. See [Finalization]() for more details.
11+
value, it is passed to your `Finalizer` function. See [Finalization][] for more details.
1212

1313
Note that `Napi::Value::IsExternal()` will return `true` for any external value.
1414
It does not differentiate between the templated parameter `T` in
@@ -44,7 +44,7 @@ static Napi::External Napi::External::New(napi_env env,
4444
- `[in] data`: The arbitrary C++ data to be held by the `Napi::External` object.
4545
- `[in] finalizeCallback`: The function called when the engine destroys the
4646
`Napi::External` object, implementing `operator()(Napi::BasicEnv, T*)`. See
47-
[Finalization]() for more details.
47+
[Finalization][] for more details.
4848

4949
Returns the created `Napi::External<T>` object.
5050

@@ -62,7 +62,7 @@ static Napi::External Napi::External::New(napi_env env,
6262
- `[in] data`: The arbitrary C++ data to be held by the `Napi::External` object.
6363
- `[in] finalizeCallback`: The function called when the engine destroys the
6464
`Napi::External` object, implementing `operator()(Napi::BasicEnv, T*, Hint*)`.
65-
See [Finalization]() for more details.
65+
See [Finalization][] for more details.
6666
- `[in] finalizeHint`: The hint value passed to the `finalizeCallback` function.
6767
6868
Returns the created `Napi::External<T>` object.

doc/object_wrap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ request being made.
242242
### Finalize
243243
244244
Provides an opportunity to run cleanup code that only utilizes basic Node APIs, if any.
245-
Override to implement. See [Finalization]() for more details.
245+
Override to implement. See [Finalization][] for more details.
246246
247247
```cpp
248248
virtual void Finalize(Napi::BasicEnv env);

0 commit comments

Comments
 (0)