Title: 4.1 Array.isArray breaking change review · Issue #41808 · microsoft/TypeScript · GitHub
Open Graph Title: 4.1 Array.isArray breaking change review · Issue #41808 · microsoft/TypeScript
X Title: 4.1 Array.isArray breaking change review · Issue #41808 · microsoft/TypeScript
Description: Categorizing breaks we've seen from this #41658, #41714 type Comparable = string | undefined | Array
Open Graph Description: Categorizing breaks we've seen from this #41658, #41714 type Comparable = string | undefined | Array
X Description: Categorizing breaks we've seen from this #41658, #41714 type Comparable = string | undefined | Array<string>; export function check<T extends Comparable>(a: T) { if (Array.isArray(a...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/41808
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"4.1 Array.isArray breaking change review","articleBody":"Categorizing breaks we've seen from this\r\n\r\n#41658, #41714\r\n```ts\r\ntype Comparable = string | undefined | Array\u003cstring>;\r\nexport function check\u003cT extends Comparable>(a: T) {\r\n\tif (Array.isArray(a)) {\r\n\t\t// 4.0: m: string\r\n\t\t// 4.1: Error, cannot index\r\n\t\tconst m = a[0];\r\n\t}\r\n}\r\n```\r\n#41610\r\n```ts\r\nconst aggregatedResults: (number[] | null | 'loading')[] = [[1, 2], null, [3, 4], 'loading', [5, 6]]\r\n// 4.0: onlyTheArrays: number[][]\r\n// 4:1 Error, no overload matches this\r\nconst onlyTheArrays = aggregatedResults.filter\u003cnumber[]>(Array.isArray) // number[][]\r\n```\r\n","author":{"url":"https://github.com/RyanCavanaugh","@type":"Person","name":"RyanCavanaugh"},"datePublished":"2020-12-03T22:56:25Z","url":"https://github.com/microsoft/TypeScript/issues/41808"}
| 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:8b531d06-8f08-4f42-f287-013406f38918 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A666:2BE220:28324E2:35A9D50:6B01B6A6 |
| html-safe-nonce | b7d17791e138afaddccc147ebbf2207a2f78d1a29a709725b605c12c9666d871 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjY2OjJCRTIyMDoyODMyNEUyOjM1QTlENTA6NkIwMUI2QTYiLCJ2aXNpdG9yX2lkIjoiNTczMDAxNjA0NjE4MzY4Njc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5ab6af91f8891a7de348c5cc5198ce7599778bbb2ec0ff8e89fe020d54b6c5a2 |
| hovercard-subject-tag | issue:756656917 |
| 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/41808/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d830d017923c2f218dbbbdb2043a0fe084e825d4675186241fef09d461c52f30/microsoft/TypeScript/issues/41808 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d830d017923c2f218dbbbdb2043a0fe084e825d4675186241fef09d461c52f30/microsoft/TypeScript/issues/41808 |
| og:image:alt | Categorizing breaks we've seen from this #41658, #41714 type Comparable = string | undefined | Array |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RyanCavanaugh |
| 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