{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6225","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6225/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6225/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6225/events","html_url":"https://github.com/Microsoft/TypeScript/issues/6225","id":123672889,"number":6225,"title":"Array destructuring typing in generic callbacks","user":{"login":"jamiewinder","id":4442179,"avatar_url":"https://avatars.githubusercontent.com/u/4442179?v=3","gravatar_id":"","url":"https://api.github.com/users/jamiewinder","html_url":"https://github.com/jamiewinder","followers_url":"https://api.github.com/users/jamiewinder/followers","following_url":"https://api.github.com/users/jamiewinder/following{/other_user}","gists_url":"https://api.github.com/users/jamiewinder/gists{/gist_id}","starred_url":"https://api.github.com/users/jamiewinder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamiewinder/subscriptions","organizations_url":"https://api.github.com/users/jamiewinder/orgs","repos_url":"https://api.github.com/users/jamiewinder/repos","events_url":"https://api.github.com/users/jamiewinder/events{/privacy}","received_events_url":"https://api.github.com/users/jamiewinder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-23T14:56:08Z","updated_at":"2015-12-23T14:56:08Z","closed_at":null,"body":"```javascript\r\nvar a = [1, 'abc'] as [number, string];\r\n\r\nvar [b, c] = a;\r\n[a].forEach(([d, e]) => {\r\n    alert(d);\r\n    alert(e);\r\n});\r\n```\r\nThere's something amiss with the typing in the above code snippet. TypeScript can figure out that `b` is a `number` and `c` is a `string`, it can even figure out that the `callbackFn` of my `forEach` is a `(value: [number, string], index: number, ...) => void`, but it says `d` and `e` are `any`. I'd have expected it to also know that these are `number` and `string` respectively."}}