René's URL Explorer Experiment


Title: extends causing string literal can't be used as index · Issue #54886 · microsoft/TypeScript · GitHub

Open Graph Title: extends causing string literal can't be used as index · Issue #54886 · microsoft/TypeScript

X Title: extends causing string literal can't be used as index · Issue #54886 · microsoft/TypeScript

Description: Bug Report 🔎 Search Terms cannot be used as an index type 🕗 Version & Regression Information This changed between versions 4.9.5 and 5.0.4 ⏯ Playground Link Playground link with relevant code 💻 Code interface Dict { foo: 1 bar: 1 } type ...

Open Graph Description: Bug Report 🔎 Search Terms cannot be used as an index type 🕗 Version & Regression Information This changed between versions 4.9.5 and 5.0.4 ⏯ Playground Link Playground link with relevant code 💻 Cod...

X Description: Bug Report 🔎 Search Terms cannot be used as an index type 🕗 Version & Regression Information This changed between versions 4.9.5 and 5.0.4 ⏯ Playground Link Playground link with relevant code 💻...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/54886

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"extends causing string literal can't be used as index","articleBody":"# Bug Report\r\n\r\n\u003c!--\r\n  Please fill in each section completely. Thank you!\r\n--\u003e\r\n\r\n### 🔎 Search Terms\r\n\r\ncannot be used as an index type\r\n\r\n### 🕗 Version \u0026 Regression Information\r\n\r\n- This changed between versions 4.9.5 and 5.0.4\r\n\r\n### ⏯ Playground Link\r\n\r\n\u003c!--\r\n  A link to a TypeScript Playground \"Share\" link which shows this behavior.\r\n  This should have the same code as the code snippet below, and use whichever settings are relevant to your report.\r\n\r\n  As a last resort, you can link to a repo, but these will be slower for us to investigate.\r\n--\u003e\r\n[Playground link with relevant code](https://www.typescriptlang.org/play?#code/JYOwLgpgTgZghgYwgAgCLAWZBvAsAKGWRgHsSAuZARgKICM4pKb8BfAgsATwAcUBBZAF40GMAG0A5KRKSAusgD0i5AHcSUANYBnDvm59kAMWHJpZSZ14oAQqfSZxRhcrUadegyiMmR52cgQAB6QIAAm2sgAFP6SyAA+ZgxQkgCUyAD8ZjJxlCAQAG7QSiqgyGAAFhAaXAA0xr5CIkZWhgDC9mJOziXIICRY6lqgAOb1ACrWZgBEMtNxCHAg-Vh0KACu2hBhyHCRS8igYcHl1gB0UQBMAKwAzAAcqUA)\r\n\r\n### 💻 Code\r\n\r\n\u003c!-- Please post the relevant code sample here as well. This code and the Playground code should be the same, do not use separate examples --\u003e\r\n```ts\r\ninterface Dict {\r\n  foo: 1\r\n  bar: 1\r\n}\r\n\r\ntype A = Dict['foo'] // works\r\n\r\ntype F = 'foo'\r\ntype B = Dict[F] // works\r\n\r\ntype FF = 'foo' extends ('foo' | 'bar') ? 'foo' : never // in theory, FF === F\r\ntype C = Dict[FF] // not working, Type '\"foo\"' cannot be used as an index type.(2538)\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\n\u003c!-- What happened, and why it was wrong --\u003e\r\n`type C` throws error\r\n\r\n### 🙂 Expected behavior\r\n\r\n\u003c!-- What you expected to happen instead, and why --\u003e\r\n\r\nno error","author":{"url":"https://github.com/troy351","@type":"Person","name":"troy351"},"datePublished":"2023-07-05T08:16:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/54886/TypeScript/issues/54886"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:d1dcefe5-ff32-7790-4973-185302fbb4a1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC362:1AC5B3:4257DE:5AC11F:6A613C4C
html-safe-nonce262b0f0cc09a19ba5dc051f65bf90b9459a194fab82bdb6f1bde66b02bd01f6b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzYyOjFBQzVCMzo0MjU3REU6NUFDMTFGOjZBNjEzQzRDIiwidmlzaXRvcl9pZCI6IjM1MDg4NzcyNjIwMDcxMjMwMjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccc784a5cc4c93945802259437b457cde9e2b362528d43b176bcc415f11f704ee
hovercard-subject-tagissue:1789029246
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/54886/issue_layout
twitter:imagehttps://opengraph.githubassets.com/180bfc9d1d71731c3bf5ea7829b74af44ec2090ddadfb2c4d14f14382be389cf/microsoft/TypeScript/issues/54886
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/180bfc9d1d71731c3bf5ea7829b74af44ec2090ddadfb2c4d14f14382be389cf/microsoft/TypeScript/issues/54886
og:image:altBug Report 🔎 Search Terms cannot be used as an index type 🕗 Version & Regression Information This changed between versions 4.9.5 and 5.0.4 ⏯ Playground Link Playground link with relevant code 💻 Cod...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernametroy351
hostnamegithub.com
expected-hostnamegithub.com
None2b7a3d1e6770dc7153450d820fcfe9a7851c4cf2251dcc29c7ad3c5cd1b9e88b
turbo-cache-controlno-preview
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release78cf9d43f120d1f03636ca22ab420bcbb1712804
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/54886#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F54886
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F54886
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/54886
Reloadhttps://github.com/microsoft/TypeScript/issues/54886
Reloadhttps://github.com/microsoft/TypeScript/issues/54886
Please reload this pagehttps://github.com/microsoft/TypeScript/issues/54886
microsoft https://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Notifications https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Fork 13.6k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Star 110k https://github.com/login?return_to=%2Fmicrosoft%2FTypeScript
Code https://github.com/microsoft/TypeScript
Issues 5k+ https://github.com/microsoft/TypeScript/issues
Pull requests 21 https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality 0 https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
Code https://github.com/microsoft/TypeScript
Issues https://github.com/microsoft/TypeScript/issues
Pull requests https://github.com/microsoft/TypeScript/pulls
Actions https://github.com/microsoft/TypeScript/actions
Projects https://github.com/microsoft/TypeScript/projects
Models https://github.com/microsoft/TypeScript/models
Wiki https://github.com/microsoft/TypeScript/wiki
Security and quality https://github.com/microsoft/TypeScript/security
Insights https://github.com/microsoft/TypeScript/pulse
extends causing string literal can't be used as indexhttps://github.com/microsoft/TypeScript/issues/54886#top
Domain: Indexed Access TypesThe issue relates to accessing subtypes via index accesshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Indexed%20Access%20Types%22
Possible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some caseshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Possible%20Improvement%22
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/troy351
troy351https://github.com/troy351
on Jul 5, 2023https://github.com/microsoft/TypeScript/issues/54886#issue-1789029246
Playground link with relevant codehttps://www.typescriptlang.org/play#code/JYOwLgpgTgZghgYwgAgCLAWZBvAsAKGWRgHsSAuZARgKICM4pKb8BfAgsATwAcUBBZAF40GMAG0A5KRKSAusgD0i5AHcSUANYBnDvm59kAMWHJpZSZ14oAQqfSZxRhcrUadegyiMmR52cgQAB6QIAAm2sgAFP6SyAA+ZgxQkgCUyAD8ZjJxlCAQAG7QSiqgyGAAFhAaXAA0xr5CIkZWhgDC9mJOziXIICRY6lqgAOb1ACrWZgBEMtNxCHAg-Vh0KACu2hBhyHCRS8igYcHl1gB0UQBMAKwAzAAcqUA
Domain: Indexed Access TypesThe issue relates to accessing subtypes via index accesshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20Indexed%20Access%20Types%22
Possible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some caseshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Possible%20Improvement%22
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
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.