{"action":"created","issue":{"url":"https://api.github.com/repos/babel/babel/issues/2610","labels_url":"https://api.github.com/repos/babel/babel/issues/2610/labels{/name}","comments_url":"https://api.github.com/repos/babel/babel/issues/2610/comments","events_url":"https://api.github.com/repos/babel/babel/issues/2610/events","html_url":"https://github.com/babel/babel/issues/2610","id":113792284,"number":2610,"title":"Enumerable getter descriptors are not enumerable on the instance","user":{"login":"jaap3","id":48517,"avatar_url":"https://avatars.githubusercontent.com/u/48517?v=3","gravatar_id":"","url":"https://api.github.com/users/jaap3","html_url":"https://github.com/jaap3","followers_url":"https://api.github.com/users/jaap3/followers","following_url":"https://api.github.com/users/jaap3/following{/other_user}","gists_url":"https://api.github.com/users/jaap3/gists{/gist_id}","starred_url":"https://api.github.com/users/jaap3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaap3/subscriptions","organizations_url":"https://api.github.com/users/jaap3/orgs","repos_url":"https://api.github.com/users/jaap3/repos","events_url":"https://api.github.com/users/jaap3/events{/privacy}","received_events_url":"https://api.github.com/users/jaap3/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/babel/babel/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-10-28T10:59:21Z","updated_at":"2015-10-28T15:35:57Z","closed_at":"2015-10-28T15:16:22Z","body":"I'm trying to make certain getters on a class instance enumerable, but am unable to get it to work. Using a decorator to set the enumerable property of a descriptor results in the getter being enumerable on the prototype, but not on the instance.\r\n\r\n```javascript\r\nfunction enumerable(cls, fname, descriptor) {\r\n    descriptor.enumerable = true;\r\n    return descriptor;\r\n}\r\n\r\nclass Person {\r\n    constructor(firstName, lastName) {\r\n        this.firstName = firstName\r\n        this.lastName = lastName\r\n    }\r\n\r\n    happy = true\r\n\r\n    @enumerable\r\n    get fullName() {\r\n        return `${this.firstName} ${this.lastName}`\r\n    }\r\n}\r\n\r\nconsole.log(Object.keys(new Person('John', 'Smith')))\r\n// expected: [ 'happy', 'fullName', 'firstName', 'lastName' ]\r\n// actual: [ 'happy', 'firstName', 'lastName' ]\r\n\r\n\r\nconsole.log(Object.keys(Person.prototype))\r\n// expected: []\r\n// actual: [ 'fullName' ]\r\n```\r\n\r\nI'm unsure if this is correct according to the specs, but it's certainly unexpected."},"comment":{"url":"https://api.github.com/repos/babel/babel/issues/comments/151884935","html_url":"https://github.com/babel/babel/issues/2610#issuecomment-151884935","issue_url":"https://api.github.com/repos/babel/babel/issues/2610","id":151884935,"user":{"login":"loganfsmyth","id":132260,"avatar_url":"https://avatars.githubusercontent.com/u/132260?v=3","gravatar_id":"","url":"https://api.github.com/users/loganfsmyth","html_url":"https://github.com/loganfsmyth","followers_url":"https://api.github.com/users/loganfsmyth/followers","following_url":"https://api.github.com/users/loganfsmyth/following{/other_user}","gists_url":"https://api.github.com/users/loganfsmyth/gists{/gist_id}","starred_url":"https://api.github.com/users/loganfsmyth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/loganfsmyth/subscriptions","organizations_url":"https://api.github.com/users/loganfsmyth/orgs","repos_url":"https://api.github.com/users/loganfsmyth/repos","events_url":"https://api.github.com/users/loganfsmyth/events{/privacy}","received_events_url":"https://api.github.com/users/loganfsmyth/received_events","type":"User","site_admin":false},"created_at":"2015-10-28T15:35:57Z","updated_at":"2015-10-28T15:35:57Z","body":"[14.5.14 step 21](http://www.ecma-international.org/ecma-262/6.0/#sec-runtime-semantics-classdefinitionevaluation) calls [`PropertyDefinitionEvaluation`](http://www.ecma-international.org/ecma-262/6.0/#sec-method-definitions-runtime-semantics-propertydefinitionevaluation) with `Person.prototype` and `false`.\r\n\r\nIf you want an 'own' getter that is enumerable, you'd have to do it yourself. You haven't really said why you need it to be enumerable though, so it is hard to give you more info."}}