Title: Iterating ES6 Map object · Issue #6842 · microsoft/TypeScript · GitHub
Open Graph Title: Iterating ES6 Map object · Issue #6842 · microsoft/TypeScript
X Title: Iterating ES6 Map object · Issue #6842 · microsoft/TypeScript
Description: When I try to iterate over a Map object as described in MDN: Map, i.e. let map = new Map
Open Graph Description: When I try to iterate over a Map object as described in MDN: Map, i.e. let map = new Map
X Description: When I try to iterate over a Map object as described in MDN: Map, i.e. let map = new Map<string, string>(); map.set("key", "value"); for (let value of map.values()) { cons...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/6842
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Iterating ES6 Map object","articleBody":"When I try to iterate over a `Map` object as described in [MDN: Map](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map#Iterating_Maps_with_for..of), i.e.\n\n``` javascript\nlet map = new Map\u003cstring, string>();\n\nmap.set(\"key\", \"value\");\n\nfor (let value of map.values()) {\n console.debug(value);\n}\n```\n\nthe compiler complains:\n\n```\nType 'IterableIterator\u003cstring>' is not an array type or a string type.\n```\n\nIs this a bug, or am I doing something wrong?\n","author":{"url":"https://github.com/heruan","@type":"Person","name":"heruan"},"datePublished":"2016-02-02T18:30:09Z","url":"https://github.com/microsoft/TypeScript/issues/6842"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:988fdffb-ba8d-4677-0075-b4948dc296a5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CF9C:27E5CD:624E65:810C0B:6B00D0F5 |
| html-safe-nonce | 5268ddf21ea712403fbf8dd71b59a71cad5b0c3d28eb957b3d4cafdf5b2ae5da |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjlDOjI3RTVDRDo2MjRFNjU6ODEwQzBCOjZCMDBEMEY1IiwidmlzaXRvcl9pZCI6IjI5NjYzMzc3MzYyMTYyMDM1MDkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7bfdb6e8db9b94dd6f66847d71e91dea93aafa5d1babee46e7388a5794114b8f |
| hovercard-subject-tag | issue:130773240 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/6842/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c746e81c89ec7520cb767b8640c1257f3baada149cef165304f880bfdd898e96/microsoft/TypeScript/issues/6842 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c746e81c89ec7520cb767b8640c1257f3baada149cef165304f880bfdd898e96/microsoft/TypeScript/issues/6842 |
| og:image:alt | When I try to iterate over a Map object as described in MDN: Map, i.e. let map = new Map |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | heruan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5 |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4943239a6d2c591325dad6e5c313e1cafda877f6 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width