Skip to content
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

Minor doc fixes #426

Closed
wants to merge 2 commits into from
Closed

Conversation

bmacnaughton
Copy link
Contributor

As I was working through the docs I made edits when I noticed typos, misspellings, or in the case of object.md, incorrect information.

I find myself doing a bit more research than I wanted to in a few cases and wondered what your thoughts were on expanding some of the docs to include examples as opposed to (mostly just) API.

Here's a list of items that I found myself experimenting with to get something working because I couldn't deduce from the docs alone what I needed to do.

  • external data
  • DefineClass examples for Instance/Static methods/properties
  • property_descriptors
  • how to use class_property_descriptors

(actually I didn't get the last two working and just found a way around the issue but those were my first approaches.)

If you're open to providing more examples for the first two let me know where you think they belong and I'll work on some.

Thanks for the excellent doc. When I compare this to trying to get Nan working over a year ago it's night and day.

- class_property_descriptor - Contructor => Constructor
- number - Nuber => Number
- object - returns *undefined* not NULL if key doesn't exist
- object_wrap - Contructor => Constructor
- property_descriptor - environemnt => environment
- associated => associates
- add a
@mhdawson
Copy link
Member

We are definitely open to adding more examples info to help clarify the concepts. Will need a bit more time to take a look to see where they might go. @NickNaso might also have some suggestions.

Copy link
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for making our docs better!

Copy link
Member

@NickNaso NickNaso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@NickNaso
Copy link
Member

Hi @bmacnaughton,
if you want add examples on documentation, you can refer on patterns the we follow in this part of the actual documentation:
https://github.com/nodejs/node-addon-api/blob/master/doc/async_worker.md#example
https://github.com/nodejs/node-addon-api/blob/master/doc/error_handling.md#examples-with-c-exceptions-enabled
https://github.com/nodejs/node-addon-api/blob/master/doc/async_context.md#example

In general we added the Example section after the API documentation. Feel free to be expressuve as you want. If your example are too complex maybe we need to consider the idea of creating an example to push on node-addon-example repo.

@bmacnaughton
Copy link
Contributor Author

Thanks. I'll take a look and think about it a bit.

@NickNaso
Copy link
Member

NickNaso commented Jan 10, 2019

@bmacnaughton please if it could help you, feel free to open an issue about that so we can sharing all the ideas together.

@DaAitch
Copy link
Contributor

DaAitch commented Jan 16, 2019

I hope I don't mix this, but as long as documentation is maintained twice, both should be up to date, but in the future we want to get rid of /doc (with #368), correct? So we should get #368 done soon?

mhdawson pushed a commit that referenced this pull request Mar 4, 2019
- class_property_descriptor - Contructor => Constructor
- object - returns *undefined* not NULL if key doesn't exist
- object_wrap - Contructor => Constructor
- property_descriptor - environemnt => environment

PR-URL: #426
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: NickNaso <[email protected]>
@mhdawson
Copy link
Member

mhdawson commented Mar 4, 2019

Landed as c629553. @bmacnaughton thanks for the updates.

@mhdawson mhdawson closed this Mar 4, 2019
@bmacnaughton bmacnaughton deleted the minor-doc-fixes branch May 17, 2019 16:46
kevindavies8 added a commit to kevindavies8/node-addon-api-Develop that referenced this pull request Aug 24, 2022
- class_property_descriptor - Contructor => Constructor
- object - returns *undefined* not NULL if key doesn't exist
- object_wrap - Contructor => Constructor
- property_descriptor - environemnt => environment

PR-URL: nodejs/node-addon-api#426
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: NickNaso <[email protected]>
Marlyfleitas added a commit to Marlyfleitas/node-api-addon-Development that referenced this pull request Aug 26, 2022
- class_property_descriptor - Contructor => Constructor
- object - returns *undefined* not NULL if key doesn't exist
- object_wrap - Contructor => Constructor
- property_descriptor - environemnt => environment

PR-URL: nodejs/node-addon-api#426
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: NickNaso <[email protected]>
wroy7860 added a commit to wroy7860/addon-api-benchmark-node that referenced this pull request Sep 19, 2022
- class_property_descriptor - Contructor => Constructor
- object - returns *undefined* not NULL if key doesn't exist
- object_wrap - Contructor => Constructor
- property_descriptor - environemnt => environment

PR-URL: nodejs/node-addon-api#426
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: NickNaso <[email protected]>
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
- class_property_descriptor - Contructor => Constructor
- object - returns *undefined* not NULL if key doesn't exist
- object_wrap - Contructor => Constructor
- property_descriptor - environemnt => environment

PR-URL: nodejs/node-addon-api#426
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: NickNaso <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants