René's URL Explorer Experiment


Title: Filter out non-array types when contextually typing array literal elements by Andarist · Pull Request #52589 · microsoft/TypeScript · GitHub

Open Graph Title: Filter out non-array types when contextually typing array literal elements by Andarist · Pull Request #52589 · microsoft/TypeScript

X Title: Filter out non-array types when contextually typing array literal elements by Andarist · Pull Request #52589 · microsoft/TypeScript

Description: fixes #52588

Open Graph Description: fixes #52588

X Description: fixes #52588

Opengraph URL: https://github.com/microsoft/TypeScript/pull/52589

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:b62be4af-f680-aa75-fb4f-c172845671c3
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDA94:1D86C4:2772B6D:321BC73:6B019855
html-safe-nonce5e4f0bdddf4e16ec4b85a6b7ae38a05811930b4cc20ffb32d9cec9c4aaba36f2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQTk0OjFEODZDNDoyNzcyQjZEOjMyMUJDNzM6NkIwMTk4NTUiLCJ2aXNpdG9yX2lkIjoiODE0NTYxNzU4MTMyNDIxMjMwOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac11ebcad6fdd587a16555ec1162ef6ab6d6280a1821f7165023fda25a94b0b8ee
hovercard-subject-tagpull_request:1228142244
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/microsoft/TypeScript/pull/52589/files
twitter:imagehttps://avatars.githubusercontent.com/u/9800850?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/9800850?s=400&v=4
og:image:altfixes #52588
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/pull/52589/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F52589%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fpull%2F52589%2Ffiles
Sign uphttps://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
Reloadhttps://github.com/microsoft/TypeScript/pull/52589/files
Reloadhttps://github.com/microsoft/TypeScript/pull/52589/files
Reloadhttps://github.com/microsoft/TypeScript/pull/52589/files
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests312 (312)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fmicrosoft%2FTypeScript%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmicrosoft%2FTypeScript%2Fissues%2Fnew%2Fchoose
Jake Bailey (jakebailey)https://github.com/jakebailey
microsoft:mainhttps://github.com/microsoft/TypeScript/tree/main
Andarist:fix/prefer-array-members-for-contextual-type-of-arr-elhttps://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 pagehttps://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 pagehttps://github.com/microsoft/TypeScript/pull/52589/files
Please reload this pagehttps://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.tshttps://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, 2023https://github.com/microsoft/TypeScript/pull/52589/files#r1130201216
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/52589/files
Mateusz Burzyński (Andarist)https://github.com/Andarist
Mar 8, 2023https://github.com/microsoft/TypeScript/pull/52589/files#r1130205265
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/52589/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/microsoft/TypeScript/pull/52589/files
Please reload this pagehttps://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.symbolshttps://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.typeshttps://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.symbolshttps://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.typeshttps://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.symbolshttps://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.typeshttps://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.tshttps://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.tshttps://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.tshttps://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
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.