question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docs: Reflect.getOwnPropertyNames does not exist

See original GitHub issue

In the documentation and source code for the prefer-reflect rule, the user is instructed to use Reflect.getOwnPropertyNames in place of Object.getOwnPropertyNames. However, Reflect.getOwnPropertyNames doesn’t actually exist. The closest corresponding Reflect method is Reflect.ownKeys, although this isn’t quite the same because it also includes Symbol properties.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
dwhiebcommented, Sep 15, 2016

Yeah, I’m working on getting #7119 in shape for merging to address this issue.

0reactions
kaicataldocommented, Oct 30, 2016

I’m closing this because the team has decided to deprecate the prefer-reflect rule (see discussion here: #7226). @dwhieb Thanks for creating the issue and being willing to do the work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

why Object.getOwnPropertyNames() does not work [duplicate]
getOwnPropertyNames () won't return properties that are inherited from the prototype. That's what "own" means -- it only returns the properties ...
Read more >
Object.getOwnPropertyNames() - JavaScript - MDN Web Docs
The Object.getOwnPropertyNames() method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found ...
Read more >
prefer-reflect - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >
Meta programming - JavaScript
A property cannot be reported as non-configurable if it does not exist as an ... Reflect helps with forwarding default operations from the...
Read more >
JavaScript: Why Reflect APIs? - GreenRoots Blog
getOwnPropertyNames : method returns an array of all properties? Many more... So why do we need a new API when these could just...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found