Title: Array.isArray refinement loses the array's type · Issue #33700 · microsoft/TypeScript · GitHub
Open Graph Title: Array.isArray refinement loses the array's type · Issue #33700 · microsoft/TypeScript
X Title: Array.isArray refinement loses the array's type · Issue #33700 · microsoft/TypeScript
Description: I realize there are a number of related issues. However, some where about ReadonlyArray, some didn't see directly related at all even though it was pointed there. Also, this is a much smaller example, just a single line of code really: P...
Open Graph Description: I realize there are a number of related issues. However, some where about ReadonlyArray, some didn't see directly related at all even though it was pointed there. Also, this is a much smaller examp...
X Description: I realize there are a number of related issues. However, some where about ReadonlyArray, some didn't see directly related at all even though it was pointed there. Also, this is a much smaller e...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/33700
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Array.isArray refinement loses the array's type","articleBody":"I realize there are a number of related issues. However, some where about ReadonlyArray, some didn't see directly related at all even though it was pointed there.\r\n\r\nAlso, this is a much smaller example, just a single line of code really:\r\n\r\n[Playground link](http://www.typescriptlang.org/play/index.html#code/GYVwdgxgLglg9mABAEwKYFs4AoZQFyICSUqATgIYBGANqgDxgjqVkB8AlAY82QNoC6iAN4AoROMQQEAZyiJypCgE9EAXkQBBReSUA6GNK3KcUdogD8iXIgK9d93PwDcIsRID07xABFU1GCwUJFy6tGAA5lAAFlbS8oiypDARiOio0XDIADSIlCByYHCIZKRwpLmoEOQg0qiIcMCIUEoADnUARORgSu2IwGWIYG7ipOkgpEgKyrro5C1YSKqsg6GoEdHsLgC+IkA)\r\n\r\nI know people will point to this ir that implementation or design decision detail — honestly guys, you got it REVERSED. The tool should serve the purpose, not the other way around!\r\n\r\nThat the array loses all it's type information in such a simple example is A BUG.\r\n\r\nAnd it is possible to do much better: See here! I'm only pointing this out because at times the responses sound like \"We tried everything but it is just not possible\" when the competition shows that it is actually quite possible.\r\n\r\nRelated(?): #17002 ","author":{"url":"https://github.com/lll000111","@type":"Person","name":"lll000111"},"datePublished":"2019-10-01T09:22:16Z","url":"https://github.com/microsoft/TypeScript/issues/33700"}
| 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:0b54d181-0199-b5a8-1f40-ae236593afec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9BE8:2D2F2F:2F73A47:3C8F230:6B01B6F1 |
| html-safe-nonce | 5286d42217c35fdba6b24fecaf4740c4571d20a8d17a902df4a160da569e3aa3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QkU4OjJEMkYyRjoyRjczQTQ3OjNDOEYyMzA6NkIwMUI2RjEiLCJ2aXNpdG9yX2lkIjoiNDc4NzU0NTQzMTg0MjMzODU0NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8cf93f9473e8cdcf9b7c234b09e121e554783ddea72891188b4580dd6339c888 |
| hovercard-subject-tag | issue:500770426 |
| 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/33700/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7cde28128b110239b7a82563024d9ec1d156a3759cd32a7f4179d7c5663ea419/microsoft/TypeScript/issues/33700 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7cde28128b110239b7a82563024d9ec1d156a3759cd32a7f4179d7c5663ea419/microsoft/TypeScript/issues/33700 |
| og:image:alt | I realize there are a number of related issues. However, some where about ReadonlyArray, some didn't see directly related at all even though it was pointed there. Also, this is a much smaller examp... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lll000111 |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width