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

doc: update attributes used by n-api samples #35220

Merged
merged 1 commit into from
Sep 18, 2020

Conversation

Flarna
Copy link
Member

@Flarna Flarna commented Sep 16, 2020

Update n-api samples to create object properties matching to the JS defaults.

Using non configurable, non writable properties has its usecases but the JS default for class methods is configurable and writable. Js properties set by JS code obj.prop = val are configurable, writable and enumerable.

Refs: nodejs/node-addon-api#811
Refs: #35214

Update n-api samples to create object properties matching to the JS defaults.

Using non configurable, non writable properties has its usecases but
the JS default for class methods is `configurable` and `writable`.
Js properties set by JS code `obj.prop = val` are `configurable`, `writable`
and `enumerable`.
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/n-api

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API. labels Sep 16, 2020
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 contributing this!

@mhdawson mhdawson merged commit a63b90e into nodejs:master Sep 18, 2020
@Flarna Flarna deleted the napi-improve-samples branch September 18, 2020 20:33
ruyadorno pushed a commit that referenced this pull request Sep 21, 2020
Update n-api samples to create object properties matching to the JS defaults.

Using non configurable, non writable properties has its usecases but
the JS default for class methods is `configurable` and `writable`.
Js properties set by JS code `obj.prop = val` are `configurable`, `writable`
and `enumerable`.
@ruyadorno ruyadorno mentioned this pull request Sep 21, 2020
4 tasks
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Update n-api samples to create object properties matching to the JS defaults.

Using non configurable, non writable properties has its usecases but
the JS default for class methods is `configurable` and `writable`.
Js properties set by JS code `obj.prop = val` are `configurable`, `writable`
and `enumerable`.
@codebytere codebytere mentioned this pull request Sep 28, 2020
joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
Update n-api samples to create object properties matching to the JS defaults.

Using non configurable, non writable properties has its usecases but
the JS default for class methods is `configurable` and `writable`.
Js properties set by JS code `obj.prop = val` are `configurable`, `writable`
and `enumerable`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants