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

typo, wrong return value or parameter name #47

Open
fi0rini opened this issue Dec 4, 2015 · 3 comments
Open

typo, wrong return value or parameter name #47

fi0rini opened this issue Dec 4, 2015 · 3 comments

Comments

@fi0rini
Copy link

fi0rini commented Dec 4, 2015

in README.md the first decorator takes description as a parameter, changes descriptor in the function body and then returns descriptor. I think it should change description in function body and then return description.

@fi0rini fi0rini changed the title wrong return value or parameter name typo, wrong return value or parameter name Dec 4, 2015
@silkentrance
Copy link

Close, outdated?

@silkentrance
Copy link

descriptors seem to be immutable, so if one needs to alter a given descriptor, one has to clone it and then return the clone, possibly modified.

@yleviel
Copy link

yleviel commented Sep 17, 2016

It is my understanding that @nf071590 is referencing the following from the examples in the doc:

function nonenumerable(target, name, description) {
  descriptor.enumerable = false;
  return descriptor;
}

Note that the parameter description does not match the variable used within the function body named descriptor (r vs. n). The fix would simply change the parameter name to descriptor.

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

No branches or pull requests

3 participants