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

Make error properties non-enumerable #30

Merged
merged 3 commits into from May 10, 2020

Conversation

Weakky
Copy link
Contributor

@Weakky Weakky commented May 6, 2020

Closes #29

test.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
test.js Outdated Show resolved Hide resolved
@sindresorhus
Copy link
Owner

sindresorhus commented May 6, 2020

Can you explicitly mention in the readme & index.d.ts which properties are enumerable and which are not?

@Weakky
Copy link
Contributor Author

Weakky commented May 7, 2020

Review done, I made code enumerable and adjusted the test so that it also makes sure that enumerable props are kept enumerable.

Readme + TS docs are also updated. I did not draw an exhaustive list of all enumerable properties as it seemed a bit long https://nodejs.org/api/errors.html#errors_class_systemerror.

@sindresorhus sindresorhus changed the title feat: make error properties non enumerable Make error properties non-enumerable May 10, 2020
@sindresorhus sindresorhus merged commit cea59fc into sindresorhus:master May 10, 2020
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.

Consider making common error properties non enumerable
2 participants