{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11162","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11162/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11162/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11162/events","html_url":"https://github.com/Microsoft/TypeScript/issues/11162","id":179367481,"number":11162,"title":"Possible bug: HTMLCollection type ostensibly doesn't contain symbol.iterator()","user":{"login":"dsifford","id":5240018,"avatar_url":"https://avatars.githubusercontent.com/u/5240018?v=3","gravatar_id":"","url":"https://api.github.com/users/dsifford","html_url":"https://github.com/dsifford","followers_url":"https://api.github.com/users/dsifford/followers","following_url":"https://api.github.com/users/dsifford/following{/other_user}","gists_url":"https://api.github.com/users/dsifford/gists{/gist_id}","starred_url":"https://api.github.com/users/dsifford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsifford/subscriptions","organizations_url":"https://api.github.com/users/dsifford/orgs","repos_url":"https://api.github.com/users/dsifford/repos","events_url":"https://api.github.com/users/dsifford/events{/privacy}","received_events_url":"https://api.github.com/users/dsifford/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-27T00:06:20Z","updated_at":"2016-09-27T00:06:20Z","closed_at":null,"body":"<!-- BUGS: Please use this template. -->\r\n<!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->\r\n<!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->\r\n\r\n**TypeScript Version:**  nightly (2.0.0-dev.201xxxxx)\r\n\r\n**Code**\r\n\r\n```ts\r\nconst collection = document.getElementsByClassName('some-class');\r\nconst idList = [...collection].map(i => i.id);\r\n```\r\n[Playground](http://www.typescriptlang.org/play/index.html#src=const%20collection%20%3D%20document.getElementsByClassName('some-class')%3B%0D%0Aconst%20idList%20%3D%20%5B...collection%5D.map(i%20%3D%3E%20i.id)%3B)\r\n\r\n**Expected behavior:**\r\nHTMLCollection (I believe) has a Symbol.iterator in its prototype, so this should work fine.\r\n \r\n**Actual behavior:** \r\n\r\n![image](https://cloud.githubusercontent.com/assets/5240018/18855881/5f542488-8424-11e6-9b99-c40894a19c75.png)\r\n\r\nWhat's interesting is that `Array.from()` works fine here.\r\n\r\nI apologize if this has already been reported. I tried searching through open issues to no avail. Thanks for all your work on this! 😄 "}}
{"actor":{"display_login":"dsifford"}}