René's URL Explorer Experiment


Title: The evaluation of the Keyof Type Operator produces different results to the Pick built-in tool. · Issue #48173 · microsoft/TypeScript · GitHub

Open Graph Title: The evaluation of the Keyof Type Operator produces different results to the Pick built-in tool. · Issue #48173 · microsoft/TypeScript

X Title: The evaluation of the Keyof Type Operator produces different results to the Pick built-in tool. · Issue #48173 · microsoft/TypeScript

Description: Bug Report 🔎 Search Terms Pick 🕗 Version & Regression Information v4.5.4 ⏯ Playground Link Link 💻 Code interface User { name?: string age?: number address?: string } type Foo = { [P in Extract]: T[P] } type Ba...

Open Graph Description: Bug Report 🔎 Search Terms Pick 🕗 Version & Regression Information v4.5.4 ⏯ Playground Link Link 💻 Code interface User { name?: string age?: number address?: string } type Foo = { [P...

X Description: Bug Report 🔎 Search Terms Pick 🕗 Version & Regression Information v4.5.4 ⏯ Playground Link Link 💻 Code interface User { name?: string age?: number address?: string } type Foo<T, U = keyof T&...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The evaluation of the Keyof Type Operator produces different results to the Pick built-in tool.","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\nPick\r\n\u003c!--\r\n  What search terms did you use when trying to find an existing bug report?\r\n  List them here so people in the future can find this one more easily.\r\n--\u003e\r\n\r\n### 🕗 Version \u0026 Regression Information\r\nv4.5.4\r\n\r\n\r\n\r\n\u003c!-- When did you start seeing this bug occur?\r\n\r\n\"Bugs\" that have existed in TS for a long time are very likely to be FAQs; refer to\r\n  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs\r\n\r\nIf possible, please try testing the nightly version of TS to see if it's already been fixed.\r\nFor npm: `typescript@next`\r\nThis is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly\r\n\r\nNote: The TypeScript Playground can be used to try older versions of TypeScript.\r\n\r\nPlease keep and fill in the line that best applies:\r\n--\u003e\r\n\r\n\r\n### ⏯ Playground Link\r\n[Link](https://www.typescriptlang.org/play?ts=4.5.4#code/JYOwLgpgTgZghgYwgAgKoGdrIN4ChnIhwC2EA-AFzLphSgDm+yc95VIArsQEbRNwATAVAjp0larQa4AvrlxgAngAcUAMQD2GgDwAVADRpkAXmQBrCIo0xkugHwmcTANoAFZKGQBRAB61EYNqohhZWNvYAulS6bhGy8goqKABCcFB6+qjGoda2DqYAShAAjhzAIgLarsAIZhneflABQSGWufZ2dglKqshF6I6aOhjQhgDkRKRjDgQEAPRzkxBUNHQg9MgAPsgcIAIQMKAQAgDcib39AEyOqekjUONL07MLSytS60A)\r\n\u003c!--\r\n  A link to a TypeScript Playground \"Share\" link which shows this behavior\r\n\r\n  The TypeScript Workbench can be used for more complex setups, try\r\n  https://www.typescriptlang.org/dev/bug-workbench/\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\r\n\r\n### 💻 Code\r\n```lang=ts\r\ninterface User {\r\n  name?: string\r\n  age?: number\r\n  address?: string\r\n}\r\n\r\ntype Foo\u003cT, U = keyof T\u003e = {\r\n  [P in Extract\u003cU, keyof T\u003e]: T[P]\r\n}\r\n\r\ntype Bar\u003cT,U=keyof T\u003e = Required\u003cPick\u003cT, Extract\u003cU, keyof T\u003e\u003e\u003e\r\n\r\ntype Res = Foo\u003cUser, 'name'\u003e     //name: string | undefined;\r\ntype Res2 = Bar\u003cUser, 'name'\u003e   //name: string\r\n```\r\n\u003c!-- Please post the relevant code sample here as well--\u003e\r\n```ts\r\n// We can quickly address your report if:\r\n//  - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!\r\n//  - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.\r\n//  - The incorrectness of the behavior is readily apparent from reading the sample.\r\n// Reports are slower to investigate if:\r\n//  - We have to pare too much extraneous code.\r\n//  - We have to clone a large repo and validate that the problem isn't elsewhere.\r\n//  - The sample is confusing or doesn't clearly demonstrate what's wrong.\r\n```\r\n\r\n### 🙁 Actual behavior\r\n```\r\ntype Res = Foo\u003cUser, 'name'\u003e     //name: string | undefined;\r\n```\r\nThe value evaluated for the name contains undefined\r\n\u003c!-- What happened, and why it was wrong --\u003e\r\n\r\n### 🙂 Expected behavior\r\n\r\n```\r\ntype Foo\u003cT, U = keyof T\u003e = {\r\n  [P in Extract\u003cU, keyof T\u003e]: T[P]\r\n}\r\n```\r\n[P in Extract\u003cU, keyof T\u003e]: T[P]   should not return undefined because  Extract only narrows down the range of the keys\r\n\r\n\u003c!-- What you expected to happen instead, and why --\u003e\r\n","author":{"url":"https://github.com/someBrown","@type":"Person","name":"someBrown"},"datePublished":"2022-03-08T08:09:19.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/48173/TypeScript/issues/48173"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:a166da68-f371-51db-769b-01c22cddc086
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id86E2:A3BF2:126E1D8:1947689:6A61B872
html-safe-noncef6516b6960b7084958b0759ae6591b485376bf7569559f5b98109e217a42c9d4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkUyOkEzQkYyOjEyNkUxRDg6MTk0NzY4OTo2QTYxQjg3MiIsInZpc2l0b3JfaWQiOiIyODQ4MDc4MzYyOTIwOTkwODM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac9146566882c0de0f062dd59e1fcc55be3f359aea277b2a895da79e50acb5e36e
hovercard-subject-tagissue:1162346184
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/48173/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ea15a7ff1ad1d696b10b417f8e97586db5ecd939011dc6c3f059dd711dff6cdd/microsoft/TypeScript/issues/48173
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ea15a7ff1ad1d696b10b417f8e97586db5ecd939011dc6c3f059dd711dff6cdd/microsoft/TypeScript/issues/48173
og:image:altBug Report 🔎 Search Terms Pick 🕗 Version & Regression Information v4.5.4 ⏯ Playground Link Link 💻 Code interface User { name?: string age?: number address?: string } type Foo = { [P...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesomeBrown
hostnamegithub.com
expected-hostnamegithub.com
None6f4633bcf01c1ad14b73fd07dd39ac31d61f3d3c2578ee08ec1792b7b351eeb9
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
releaseac296ae7f21856f1f92adbad22f870b6fbb4b907
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/48173#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F48173
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%2F48173
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/48173
Reloadhttps://github.com/microsoft/TypeScript/issues/48173
Reloadhttps://github.com/microsoft/TypeScript/issues/48173
Please reload this pagehttps://github.com/microsoft/TypeScript/issues/48173
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
The evaluation of the Keyof Type Operator produces different results to the Pick built-in tool.https://github.com/microsoft/TypeScript/issues/48173#top
QuestionAn issue which isn't directly actionable in codehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Question%22
https://github.com/someBrown
someBrownhttps://github.com/someBrown
on Mar 8, 2022https://github.com/microsoft/TypeScript/issues/48173#issue-1162346184
Linkhttps://www.typescriptlang.org/play?ts=4.5.4#code/JYOwLgpgTgZghgYwgAgKoGdrIN4ChnIhwC2EA-AFzLphSgDm+yc95VIArsQEbRNwATAVAjp0larQa4AvrlxgAngAcUAMQD2GgDwAVADRpkAXmQBrCIo0xkugHwmcTANoAFZKGQBRAB61EYNqohhZWNvYAulS6bhGy8goqKABCcFB6+qjGoda2DqYAShAAjhzAIgLarsAIZhneflABQSGWufZ2dglKqshF6I6aOhjQhgDkRKRjDgQEAPRzkxBUNHQg9MgAPsgcIAIQMKAQAgDcib39AEyOqekjUONL07MLSytS60A
QuestionAn issue which isn't directly actionable in codehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Question%22
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.