Title: Index signature & iterators · Issue #2862 · microsoft/TypeScript · GitHub
Open Graph Title: Index signature & iterators · Issue #2862 · microsoft/TypeScript
X Title: Index signature & iterators · Issue #2862 · microsoft/TypeScript
Description: interface Files { [key: number]: SomeFile length: number } var data: Files = [] // no complaints for (var i in data) { } // Type 'Files' is not an array type or a string type for (let file of data) { } I'm not sure what is the right move...
Open Graph Description: interface Files { [key: number]: SomeFile length: number } var data: Files = [] // no complaints for (var i in data) { } // Type 'Files' is not an array type or a string type for (let file of data)...
X Description: interface Files { [key: number]: SomeFile length: number } var data: Files = [] // no complaints for (var i in data) { } // Type 'Files' is not an array type or a string type for (let file ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/2862
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Index signature & iterators","articleBody":"```\ninterface Files {\n [key: number]: SomeFile\n length: number\n}\nvar data: Files = []\n// no complaints\nfor (var i in data) {\n}\n\n// Type 'Files' is not an array type or a string type\nfor (let file of data) {\n}\n```\n\nI'm not sure what is the right move here. Files has an index but that doesn't mean it's iterable/enumerable. Think the check should just be removed.\n","author":{"url":"https://github.com/jbondc","@type":"Person","name":"jbondc"},"datePublished":"2015-04-22T11:15:19Z","url":"https://github.com/microsoft/TypeScript/issues/2862"}
| 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:f6c3c641-f002-caac-07ea-3b49e6e17cff |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DA08:24ACB9:5E890D:7F0F03:6B00D08B |
| html-safe-nonce | e42532dc5c98e2e3bbae5702bf3f591aa6ebd133955be6865ad8061839b7ab58 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTA4OjI0QUNCOTo1RTg5MEQ6N0YwRjAzOjZCMDBEMDhCIiwidmlzaXRvcl9pZCI6IjcxNjAxODg5MzQ5OTQwNTUzMDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 7991caa95c7f77d578bf8ca60173f5a061f77d395744a6f802747c50e2f4b00d |
| hovercard-subject-tag | issue:70098056 |
| 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/2862/issue_layout |
| twitter:image | https://opengraph.githubassets.com/93766bfbf26b48ab52b55b95820745f3ef3afc2cf20a1ea66f56724a4b359edc/microsoft/TypeScript/issues/2862 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/93766bfbf26b48ab52b55b95820745f3ef3afc2cf20a1ea66f56724a4b359edc/microsoft/TypeScript/issues/2862 |
| og:image:alt | interface Files { [key: number]: SomeFile length: number } var data: Files = [] // no complaints for (var i in data) { } // Type 'Files' is not an array type or a string type for (let file of data)... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jbondc |
| 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