{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6346","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6346/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6346/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6346/events","html_url":"https://github.com/Microsoft/TypeScript/issues/6346","id":124822053,"number":6346,"title":"Solve the for-in / indexer mess","user":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Committed","name":"Committed","color":"009800"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Fixed","name":"Fixed","color":"bfe5bf"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75"}],"state":"closed","locked":false,"assignee":{"login":"ahejlsberg","id":4226954,"avatar_url":"https://avatars.githubusercontent.com/u/4226954?v=3","gravatar_id":"","url":"https://api.github.com/users/ahejlsberg","html_url":"https://github.com/ahejlsberg","followers_url":"https://api.github.com/users/ahejlsberg/followers","following_url":"https://api.github.com/users/ahejlsberg/following{/other_user}","gists_url":"https://api.github.com/users/ahejlsberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ahejlsberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahejlsberg/subscriptions","organizations_url":"https://api.github.com/users/ahejlsberg/orgs","repos_url":"https://api.github.com/users/ahejlsberg/repos","events_url":"https://api.github.com/users/ahejlsberg/events{/privacy}","received_events_url":"https://api.github.com/users/ahejlsberg/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/15","html_url":"https://github.com/Microsoft/TypeScript/milestones/TypeScript%201.8","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/15/labels","id":1347987,"number":15,"title":"TypeScript 1.8","description":"","creator":{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":313,"state":"closed","created_at":"2015-10-09T22:07:47Z","updated_at":"2016-03-09T16:39:56Z","due_on":null,"closed_at":"2016-01-28T20:08:21Z"},"comments":23,"created_at":"2016-01-04T19:29:03Z","updated_at":"2016-03-09T18:45:27Z","closed_at":"2016-01-08T21:45:26Z","body":"/cc @vladima @ahejlsberg @billti \r\n\r\n### Motivating Examples\r\n\r\n```ts\r\nvar arr = [1, 2, 3];\r\n```\r\n\r\nThis should be an error (`k` is always a `string`):\r\n```ts\r\nfor(var k in arr) {\r\n  if(k === 0) { ... }\r\n}\r\n```\r\n\r\nThis should *not* be an error, even under no implicit any:\r\n```ts\r\nfor(var k in arr) {\r\n  if(arr[k] === 0) { ... }\r\n}\r\n```\r\n\r\nThis should *somehow?* not be an error, even though it involves a coercion we would normally disallow\r\n```ts\r\nfor(var k in arr) {\r\n  if (k > 0) { ... }\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/194446406","html_url":"https://github.com/Microsoft/TypeScript/issues/6346#issuecomment-194446406","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6346","id":194446406,"user":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"created_at":"2016-03-09T18:45:27Z","updated_at":"2016-03-09T18:45:27Z","body":"I don't understand what doesn't work about your sample."}}