Skip to content

Commit 86be13a

Browse files
rivertammhdawson
authored andcommitted
doc: Fix HandleScope docs
It turns out `HandleScope::New` doesn't actually exist, fix up doc. PR-URL: #287 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@NickNaso.local>
1 parent 90f92c4 commit 86be13a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/handle_scope.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ the section titled (Object lifetime management)[object_lifetime_management].
1212

1313
### Constructor
1414

15-
Creates a new handle scope.
15+
Creates a new handle scope on the stack.
1616

1717
```cpp
18-
HandleScope HandleScope::New(Napi:Env env);
18+
HandleScope(Napi:Env env);
1919
```
2020
21-
- `[in] Env`: The environment in which to construct the HandleScope object.
21+
- `[in] env`: The environment in which to construct the HandleScope object.
2222
2323
Returns a new HandleScope
2424
2525
2626
### Constructor
2727
28-
Creates a new handle scope.
28+
Creates a new handle scope on the stack.
2929
3030
```cpp
31-
HandleScope HandleScope::New(napi_env env, napi_handle_scope scope);
31+
HandleScope(Napi::Env env, Napi::HandleScope scope);
3232
```
3333

34-
- `[in] env`: napi_env in which the scope passed in was created.
35-
- `[in] scope`: pre-existing napi_handle_scope.
34+
- `[in] env`: Napi::Env in which the scope passed in was created.
35+
- `[in] scope`: pre-existing Napi::HandleScope.
3636

3737
Returns a new HandleScope instance which wraps the napi_handle_scope
3838
handle passed in. This can be used to mix usage of the C N-API
@@ -41,7 +41,7 @@ and node-addon-api.
4141
operator HandleScope::napi_handle_scope
4242

4343
```cpp
44-
operator HandleScope::napi_handle_scope() const
44+
operator napi_handle_scope() const
4545
```
4646

4747
Returns the N-API napi_handle_scope wrapped by the EscapableHandleScope object.

0 commit comments

Comments
 (0)