-
Notifications
You must be signed in to change notification settings - Fork 461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: add inheritance links and other changes #798
doc: add inheritance links and other changes #798
Conversation
* README.md: * Change indentation to reflect class hierarchy. * Link to new doc/hierarchy.md which shows full class hierarchy. * Add single sentence with link to parent class at the top of class doc. * doc/addon.md: * Replace `Addon` with `Addon<T>`. * Show templating in prototypes. * Move `InstanceWrap<T>` method documentation to its own file, because it is shared with `ObjectWRap<T>`, and link to said new file. * doc/array.md: Create the file from the `Array`-related contents of doc/basic_types.md. * Remove doc/basic_types.md, splitting its contents per-class into individual files. * Add doc/hierarchy.md, with full class hierarchy. * Add doc/instance_wrap.md for documenting `InstanceMethod`, `InstanceAccessor`, and `InstanceValue`. * Create doc/name.md from doc/basic_types.md, documenting `Napi::Name`. * doc/object_wrap.md: * Add templating notation `Napi::ObjectWrap<T>`. * Show templating in prototypes. * Wrap file to 80 columns. * Remove methods provided by `InstanceWrap<T>` and link to doc/instance_wrap.md. * doc/value.md: * Merge documentation from doc/basic_types.md. * Add namespacing. * Sort methods alphabetically. Signed-off-by: Gabriel Schulhof <[email protected]> Fixes: nodejs#796
1249bde
to
60c2acf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work just some comments to address.
README.md
Outdated
- [ObjectReference](doc/object_reference.md) | ||
- [PropertyDescriptor](doc/property_descriptor.md) | ||
- [Value](doc/value.md) | ||
- [Name](doc/basic_types.md#name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link is broken the right one is:
README.md
Outdated
- [Boolean](doc/boolean.md) | ||
- [External](doc/external.md) | ||
- [Object](doc/object.md) | ||
- [Array](doc/basic_types.md#array) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This link is broken the right one is:
doc/array.md
Outdated
[`Napi::TypedArray`][] and [`Napi::ArrayBuffer`][] correspond to JavaScript data | ||
types such as [`Int32Array`][] and [`ArrayBuffer`][], respectively, that can be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the links for:
Napi::TypedArray
Napi::ArrayBuffer
Int32Array
ArrayBuffer
This class serves as the base class for [`Napi::ObjectWrap<T>`][] and | ||
[`Napi::Addon<T>`][]. | ||
|
||
In the case of [`Napi::Addon<T>`][] it provides the | ||
methods for exposing functions to JavaScript on instances of an add-on. | ||
|
||
As a base class for [`Napi::ObjectWrap<T>`][] it provides the methods for | ||
exposing instance methods of JavaScript objects instantiated from the JavaScript | ||
class corresponding to the subclass of [`Napi::ObjectWrap<T>`][]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the link for:
Napi::ObjectWrap<T>
Napi::Addon<T>
Napi::ObjectWrap<T>
The `Napi::Addon` class can be used to define an entire add-on. Instances of | ||
`Napi::Addon` subclasses become instances of the add-on, stored safely by | ||
The `Napi::Addon<T>` class can be used to define an entire add-on. Instances of | ||
`Napi::Addon<T>` subclasses become instances of the add-on, stored safely by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only available in the recent versions right. I'm wondering if we needed some versioning so that people can tell when new APIs are available.
Overall it looks good one the links @NickNaso has mentioned are fixed up. The only concern I have is around is the shift to the versions and people using older versions or the existing examples. Does the updated doc have enough explanation for those not using the templated version? Lets discuss in the N-API team meeting tomorrow. |
Discussed in the meeting today, these were always templated so this comment does not apply "updated doc have enough explanation for those not using the templated version", given that I think its good. As a follow on we should probably introduce info about which versions introduce which APIs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once @NickNaso comments are addressed
@NickNaso I fixed the broken links. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
* README.md: * Change indentation to reflect class hierarchy. * Link to new doc/hierarchy.md which shows full class hierarchy. * Add single sentence with link to parent class at the top of class doc. * doc/addon.md: * Replace `Addon` with `Addon<T>`. * Show templating in prototypes. * Move `InstanceWrap<T>` method documentation to its own file, because it is shared with `ObjectWRap<T>`, and link to said new file. * doc/array.md: Create the file from the `Array`-related contents of doc/basic_types.md. * Remove doc/basic_types.md, splitting its contents per-class into individual files. * Add doc/hierarchy.md, with full class hierarchy. * Add doc/instance_wrap.md for documenting `InstanceMethod`, `InstanceAccessor`, and `InstanceValue`. * Create doc/name.md from doc/basic_types.md, documenting `Napi::Name`. * doc/object_wrap.md: * Add templating notation `Napi::ObjectWrap<T>`. * Show templating in prototypes. * Wrap file to 80 columns. * Remove methods provided by `InstanceWrap<T>` and link to doc/instance_wrap.md. * doc/value.md: * Merge documentation from doc/basic_types.md. * Add namespacing. * Sort methods alphabetically. Signed-off-by: Gabriel Schulhof <[email protected]> Fixes: #796 PR-URL: #798 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
Landed in 8c9f180. |
* README.md: * Change indentation to reflect class hierarchy. * Link to new doc/hierarchy.md which shows full class hierarchy. * Add single sentence with link to parent class at the top of class doc. * doc/addon.md: * Replace `Addon` with `Addon<T>`. * Show templating in prototypes. * Move `InstanceWrap<T>` method documentation to its own file, because it is shared with `ObjectWRap<T>`, and link to said new file. * doc/array.md: Create the file from the `Array`-related contents of doc/basic_types.md. * Remove doc/basic_types.md, splitting its contents per-class into individual files. * Add doc/hierarchy.md, with full class hierarchy. * Add doc/instance_wrap.md for documenting `InstanceMethod`, `InstanceAccessor`, and `InstanceValue`. * Create doc/name.md from doc/basic_types.md, documenting `Napi::Name`. * doc/object_wrap.md: * Add templating notation `Napi::ObjectWrap<T>`. * Show templating in prototypes. * Wrap file to 80 columns. * Remove methods provided by `InstanceWrap<T>` and link to doc/instance_wrap.md. * doc/value.md: * Merge documentation from doc/basic_types.md. * Add namespacing. * Sort methods alphabetically. Signed-off-by: Gabriel Schulhof <[email protected]> Fixes: nodejs#796 PR-URL: nodejs#798 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
* README.md: * Change indentation to reflect class hierarchy. * Link to new doc/hierarchy.md which shows full class hierarchy. * Add single sentence with link to parent class at the top of class doc. * doc/addon.md: * Replace `Addon` with `Addon<T>`. * Show templating in prototypes. * Move `InstanceWrap<T>` method documentation to its own file, because it is shared with `ObjectWRap<T>`, and link to said new file. * doc/array.md: Create the file from the `Array`-related contents of doc/basic_types.md. * Remove doc/basic_types.md, splitting its contents per-class into individual files. * Add doc/hierarchy.md, with full class hierarchy. * Add doc/instance_wrap.md for documenting `InstanceMethod`, `InstanceAccessor`, and `InstanceValue`. * Create doc/name.md from doc/basic_types.md, documenting `Napi::Name`. * doc/object_wrap.md: * Add templating notation `Napi::ObjectWrap<T>`. * Show templating in prototypes. * Wrap file to 80 columns. * Remove methods provided by `InstanceWrap<T>` and link to doc/instance_wrap.md. * doc/value.md: * Merge documentation from doc/basic_types.md. * Add namespacing. * Sort methods alphabetically. Signed-off-by: Gabriel Schulhof <[email protected]> Fixes: nodejs/node-addon-api#796 PR-URL: nodejs/node-addon-api#798 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
* README.md: * Change indentation to reflect class hierarchy. * Link to new doc/hierarchy.md which shows full class hierarchy. * Add single sentence with link to parent class at the top of class doc. * doc/addon.md: * Replace `Addon` with `Addon<T>`. * Show templating in prototypes. * Move `InstanceWrap<T>` method documentation to its own file, because it is shared with `ObjectWRap<T>`, and link to said new file. * doc/array.md: Create the file from the `Array`-related contents of doc/basic_types.md. * Remove doc/basic_types.md, splitting its contents per-class into individual files. * Add doc/hierarchy.md, with full class hierarchy. * Add doc/instance_wrap.md for documenting `InstanceMethod`, `InstanceAccessor`, and `InstanceValue`. * Create doc/name.md from doc/basic_types.md, documenting `Napi::Name`. * doc/object_wrap.md: * Add templating notation `Napi::ObjectWrap<T>`. * Show templating in prototypes. * Wrap file to 80 columns. * Remove methods provided by `InstanceWrap<T>` and link to doc/instance_wrap.md. * doc/value.md: * Merge documentation from doc/basic_types.md. * Add namespacing. * Sort methods alphabetically. Signed-off-by: Gabriel Schulhof <[email protected]> Fixes: nodejs/node-addon-api#796 PR-URL: nodejs/node-addon-api#798 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
* README.md: * Change indentation to reflect class hierarchy. * Link to new doc/hierarchy.md which shows full class hierarchy. * Add single sentence with link to parent class at the top of class doc. * doc/addon.md: * Replace `Addon` with `Addon<T>`. * Show templating in prototypes. * Move `InstanceWrap<T>` method documentation to its own file, because it is shared with `ObjectWRap<T>`, and link to said new file. * doc/array.md: Create the file from the `Array`-related contents of doc/basic_types.md. * Remove doc/basic_types.md, splitting its contents per-class into individual files. * Add doc/hierarchy.md, with full class hierarchy. * Add doc/instance_wrap.md for documenting `InstanceMethod`, `InstanceAccessor`, and `InstanceValue`. * Create doc/name.md from doc/basic_types.md, documenting `Napi::Name`. * doc/object_wrap.md: * Add templating notation `Napi::ObjectWrap<T>`. * Show templating in prototypes. * Wrap file to 80 columns. * Remove methods provided by `InstanceWrap<T>` and link to doc/instance_wrap.md. * doc/value.md: * Merge documentation from doc/basic_types.md. * Add namespacing. * Sort methods alphabetically. Signed-off-by: Gabriel Schulhof <[email protected]> Fixes: nodejs/node-addon-api#796 PR-URL: nodejs/node-addon-api#798 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
* README.md: * Change indentation to reflect class hierarchy. * Link to new doc/hierarchy.md which shows full class hierarchy. * Add single sentence with link to parent class at the top of class doc. * doc/addon.md: * Replace `Addon` with `Addon<T>`. * Show templating in prototypes. * Move `InstanceWrap<T>` method documentation to its own file, because it is shared with `ObjectWRap<T>`, and link to said new file. * doc/array.md: Create the file from the `Array`-related contents of doc/basic_types.md. * Remove doc/basic_types.md, splitting its contents per-class into individual files. * Add doc/hierarchy.md, with full class hierarchy. * Add doc/instance_wrap.md for documenting `InstanceMethod`, `InstanceAccessor`, and `InstanceValue`. * Create doc/name.md from doc/basic_types.md, documenting `Napi::Name`. * doc/object_wrap.md: * Add templating notation `Napi::ObjectWrap<T>`. * Show templating in prototypes. * Wrap file to 80 columns. * Remove methods provided by `InstanceWrap<T>` and link to doc/instance_wrap.md. * doc/value.md: * Merge documentation from doc/basic_types.md. * Add namespacing. * Sort methods alphabetically. Signed-off-by: Gabriel Schulhof <[email protected]> Fixes: nodejs/node-addon-api#796 PR-URL: nodejs/node-addon-api#798 Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Nicola Del Gobbo <[email protected]>
Addon
withAddon<T>
.InstanceWrap<T>
method documentation to its own file, becauseit is shared with
ObjectWRap<T>
, and link to said new file.Array
-related contents ofdoc/basic_types.md.
individual files.
InstanceMethod
,InstanceAccessor
, andInstanceValue
.Napi::Name
.Napi::ObjectWrap<T>
.InstanceWrap<T>
and link todoc/instance_wrap.md.
Signed-off-by: @gabrielschulhof