| 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 | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:b62be4af-f680-aa75-fb4f-c172845671c3 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DA94:1D86C4:2772B6D:321BC73:6B019855 |
| html-safe-nonce | 5e4f0bdddf4e16ec4b85a6b7ae38a05811930b4cc20ffb32d9cec9c4aaba36f2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTk0OjFEODZDNDoyNzcyQjZEOjMyMUJDNzM6NkIwMTk4NTUiLCJ2aXNpdG9yX2lkIjoiODE0NTYxNzU4MTMyNDIxMjMwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 11ebcad6fdd587a16555ec1162ef6ab6d6280a1821f7165023fda25a94b0b8ee |
| hovercard-subject-tag | pull_request:1228142244 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/microsoft/TypeScript/pull/52589/files |
| twitter:image | https://avatars.githubusercontent.com/u/9800850?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/9800850?s=400&v=4 |
| og:image:alt | fixes #52588 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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 |
| Skip to content | https://github.com/microsoft/TypeScript/pull/52589/files#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F52589%2Ffiles |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F52589%2Ffiles |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=microsoft%2FTypeScript |
| Reload | https://github.com/microsoft/TypeScript/pull/52589/files |
| Reload | https://github.com/microsoft/TypeScript/pull/52589/files |
| Reload | https://github.com/microsoft/TypeScript/pull/52589/files |
| microsoft | https://github.com/microsoft |
| TypeScript | https://github.com/microsoft/TypeScript |
| Code | https://github.com/microsoft/TypeScript |
| Issues5k (5k) | https://github.com/microsoft/TypeScript/issues |
| Pull requests312 (312) | https://github.com/microsoft/TypeScript/pulls |
| Actions | https://github.com/microsoft/TypeScript/actions |
| Projects | https://github.com/microsoft/TypeScript/projects |
| Wiki | https://github.com/microsoft/TypeScript/wiki |
| Security and quality | https://github.com/microsoft/TypeScript/security |
| Insights | https://github.com/microsoft/TypeScript/insights |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fmicrosoft%2FTypeScript%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript%2Fissues%2Fnew%2Fchoose |
| Jake Bailey (jakebailey) | https://github.com/jakebailey |
| microsoft:main | https://github.com/microsoft/TypeScript/tree/main |
| Andarist:fix/prefer-array-members-for-contextual-type-of-arr-el | https://github.com/Andarist/TypeScript/tree/fix/prefer-array-members-for-contextual-type-of-arr-el |
|
Conversation
66
| https://github.com/microsoft/TypeScript/pull/52589 |
|
Commits
11
| https://github.com/microsoft/TypeScript/pull/52589/commits |
|
Checks
0
| https://github.com/microsoft/TypeScript/pull/52589/checks |
|
Files changed
| https://github.com/microsoft/TypeScript/pull/52589/files |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/52589/files |
|
Filter out non-array types when contextually typing array literal elements
| https://github.com/microsoft/TypeScript/pull/52589/files#top |
|
Show all changes
11 commits
| https://github.com/microsoft/TypeScript/pull/52589/files |
|
8ebc95f
Filter out non-array types when contextually typing union members
Andarist Feb 3, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/8ebc95ffcdb81fb6acab7dec548afc7540fa01f2 |
|
47bd0dd
Merge branch 'main' into fix/prefer-array-members-for-contextual-type…
Andarist Feb 11, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/47bd0dded930febe9dfa7d741f7df5b13d236a4e |
|
c659bc8
Add extra test case for contextual type caching
Andarist Feb 11, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/c659bc8fb69792e3dbd401836b0d124f2c90b81f |
|
d56e1a9
Cache `anyIterable` in `getContextualTypeForElementExpression`
Andarist Feb 11, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/d56e1a92612080f2069c8371195bde9bcf3a6f94 |
|
0d5b9d5
Cover both lib es5 and es2015 cases
Andarist Feb 11, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/0d5b9d50a5a13173a49d6429a2d18584427ed557 |
|
f0093bd
Introduce `isAssignableToAvailableAnyIterable` helper
Andarist Feb 11, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/f0093bda45ca7ba1c5e2fdef3a61c26da75d93d6 |
|
64ec074
Cache `anyIterable` creation
Andarist Feb 11, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/64ec07473d8f3ed048bbda25f6dad682ba1db174 |
|
a531e1e
Merge remote-tracking branch 'origin/main' into fix/prefer-array-memb…
Andarist Feb 18, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/a531e1ee04485aab29e6afd27d270dafd81faa46 |
|
8561b1b
Merge remote-tracking branch 'origin/main' into fix/prefer-array-memb…
Andarist Mar 8, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/8561b1b82fe469ec35e57e450d160df78ec7c8a9 |
|
52c423a
use var instead of let
Andarist Mar 8, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/52c423a9948494304d7747158cfeb7c122ddc55c |
|
85c03c5
Drop anyIterable caching
Andarist Mar 8, 2023
| https://github.com/microsoft/TypeScript/pull/52589/commits/85c03c5f7f47410044350903a68497784ccf4f28 |
|
Clear filters
| https://github.com/microsoft/TypeScript/pull/52589/files |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/52589/files |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/52589/files |
|
checker.ts
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8 |
|
contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.symbols
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-82a560d778a4dd3e1a41669a33e384161cac88a69d70ba68ba97e166ff32d89a |
|
contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.types
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-850c58c0978bda318eb23f8c61af9be0d9d4889b9afbdbe1a06f2f9231f192ab |
|
contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.symbols
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-6e5cac4235be50e7e85d4eb93c15cb32ada4ca56bd6c4510d31d198716e75689 |
|
contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.types
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-c5cf6c5372f8c560694b1bef3775ba32c20d021193ca57972d2a32322fbfb5ba |
|
contextualTypeCaching.symbols
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-7139c25573c0d6acd12c15b4ff94f90ec2c2310bc75651434a15f51105048250 |
|
contextualTypeCaching.types
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-f45c1f8a7ebd43485ff70ca38b75bff5542136b8f2e534f304e4e089c40d73b5 |
|
contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.ts
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-f837e3bbf9d5ac5b3f33efc00f71a29583ed65749108f0ede6992f257c8211e0 |
|
contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.ts
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-a6c7db112061dcdb306673890d625dcccf05f34cf56d1757671ec90f40d6dd65 |
|
contextualTypeCaching.ts
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9600d29cb6c640b1f72ab1579b35ebbc7d4a5562aa3fd4e1fb5180dcb5f78b1 |
| src/compiler/checker.ts | https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8 |
|
View file
| https://github.com/Andarist/TypeScript/blob/85c03c5f7f47410044350903a68497784ccf4f28/src/compiler/checker.ts |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/52589/{{ revealButtonHref }} |
|
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8 |
|
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8 |
|
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8 |
| Jake Bailey (jakebailey) | https://github.com/jakebailey |
| Mar 8, 2023 | https://github.com/microsoft/TypeScript/pull/52589/files#r1130201216 |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/52589/files |
| Mateusz Burzyński (Andarist) | https://github.com/Andarist |
| Mar 8, 2023 | https://github.com/microsoft/TypeScript/pull/52589/files#r1130205265 |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/52589/files |
| Learn more | https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/52589/files |
| Please reload this page | https://github.com/microsoft/TypeScript/pull/52589/files |
|
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8 |
|
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8 |
|
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9ab6589e714c71e657f601cf30ff51dfc607fc98419bf72e04f6b0fa92cc4b8 |
| ...lines/reference/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.symbols | https://github.com/microsoft/TypeScript/pull/52589/files#diff-82a560d778a4dd3e1a41669a33e384161cac88a69d70ba68ba97e166ff32d89a |
|
View file
| https://github.com/Andarist/TypeScript/blob/85c03c5f7f47410044350903a68497784ccf4f28/tests/baselines/reference/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.symbols |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/52589/{{ revealButtonHref }} |
| ...selines/reference/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.types | https://github.com/microsoft/TypeScript/pull/52589/files#diff-850c58c0978bda318eb23f8c61af9be0d9d4889b9afbdbe1a06f2f9231f192ab |
|
View file
| https://github.com/Andarist/TypeScript/blob/85c03c5f7f47410044350903a68497784ccf4f28/tests/baselines/reference/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.types |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/52589/{{ revealButtonHref }} |
| ...aselines/reference/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.symbols | https://github.com/microsoft/TypeScript/pull/52589/files#diff-6e5cac4235be50e7e85d4eb93c15cb32ada4ca56bd6c4510d31d198716e75689 |
|
View file
| https://github.com/Andarist/TypeScript/blob/85c03c5f7f47410044350903a68497784ccf4f28/tests/baselines/reference/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.symbols |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/52589/{{ revealButtonHref }} |
| .../baselines/reference/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.types | https://github.com/microsoft/TypeScript/pull/52589/files#diff-c5cf6c5372f8c560694b1bef3775ba32c20d021193ca57972d2a32322fbfb5ba |
|
View file
| https://github.com/Andarist/TypeScript/blob/85c03c5f7f47410044350903a68497784ccf4f28/tests/baselines/reference/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.types |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/52589/{{ revealButtonHref }} |
| tests/baselines/reference/contextualTypeCaching.symbols | https://github.com/microsoft/TypeScript/pull/52589/files#diff-7139c25573c0d6acd12c15b4ff94f90ec2c2310bc75651434a15f51105048250 |
|
View file
| https://github.com/Andarist/TypeScript/blob/85c03c5f7f47410044350903a68497784ccf4f28/tests/baselines/reference/contextualTypeCaching.symbols |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/52589/{{ revealButtonHref }} |
|
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-7139c25573c0d6acd12c15b4ff94f90ec2c2310bc75651434a15f51105048250 |
| tests/baselines/reference/contextualTypeCaching.types | https://github.com/microsoft/TypeScript/pull/52589/files#diff-f45c1f8a7ebd43485ff70ca38b75bff5542136b8f2e534f304e4e089c40d73b5 |
|
View file
| https://github.com/Andarist/TypeScript/blob/85c03c5f7f47410044350903a68497784ccf4f28/tests/baselines/reference/contextualTypeCaching.types |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/52589/{{ revealButtonHref }} |
|
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-f45c1f8a7ebd43485ff70ca38b75bff5542136b8f2e534f304e4e089c40d73b5 |
| tests/cases/compiler/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.ts | https://github.com/microsoft/TypeScript/pull/52589/files#diff-f837e3bbf9d5ac5b3f33efc00f71a29583ed65749108f0ede6992f257c8211e0 |
|
View file
| https://github.com/Andarist/TypeScript/blob/85c03c5f7f47410044350903a68497784ccf4f28/tests/cases/compiler/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs2015.ts |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/52589/{{ revealButtonHref }} |
| tests/cases/compiler/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.ts | https://github.com/microsoft/TypeScript/pull/52589/files#diff-a6c7db112061dcdb306673890d625dcccf05f34cf56d1757671ec90f40d6dd65 |
|
View file
| https://github.com/Andarist/TypeScript/blob/85c03c5f7f47410044350903a68497784ccf4f28/tests/cases/compiler/contextualSignatureInArrayElementPrefersArrayUnionMemberLibEs5.ts |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/52589/{{ revealButtonHref }} |
| tests/cases/compiler/contextualTypeCaching.ts | https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9600d29cb6c640b1f72ab1579b35ebbc7d4a5562aa3fd4e1fb5180dcb5f78b1 |
|
View file
| https://github.com/Andarist/TypeScript/blob/85c03c5f7f47410044350903a68497784ccf4f28/tests/cases/compiler/contextualTypeCaching.ts |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/microsoft/TypeScript/pull/52589/{{ revealButtonHref }} |
|
| https://github.com/microsoft/TypeScript/pull/52589/files#diff-d9600d29cb6c640b1f72ab1579b35ebbc7d4a5562aa3fd4e1fb5180dcb5f78b1 |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |