Skip to content

Commit

Permalink
n-api: document the look of napi_external values
Browse files Browse the repository at this point in the history
Describe what JavaScript values of type `napi_external` look like in
JavaScript.

Fixes: nodejs/abi-stable-node#306
PR-URL: #20426
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
  • Loading branch information
Gabriel Schulhof authored and MylesBorins committed May 4, 2018
1 parent 7ac491b commit 1908668
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/api/n-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1051,6 +1051,9 @@ the ECMAScript Language Specification.
In addition to types in that section, `napi_valuetype` can also represent
`Function`s and `Object`s with external data.

A JavaScript value of type `napi_external` appears in JavaScript as a plain
object such that no properties can be set on it, and no prototype.

#### napi_typedarray_type
```C
typedef enum {
Expand Down

0 comments on commit 1908668

Please sign in to comment.