René's URL Explorer Experiment


Title: Incorrect inference of arrow function with intersected mapped type argument under strictFunctionTypes · Issue #32664 · microsoft/TypeScript · GitHub

Open Graph Title: Incorrect inference of arrow function with intersected mapped type argument under strictFunctionTypes · Issue #32664 · microsoft/TypeScript

X Title: Incorrect inference of arrow function with intersected mapped type argument under strictFunctionTypes · Issue #32664 · microsoft/TypeScript

Description: TypeScript Version: 3.6.0-dev.20190801 Search Terms: inference intersection type strictFunctionTypes Code type MappedIntersection = { [P in keyof T]: string } & {}; type MappedRaw = { [P in keyof T]: string };...

Open Graph Description: TypeScript Version: 3.6.0-dev.20190801 Search Terms: inference intersection type strictFunctionTypes Code type MappedIntersection = { [P in keyof T]: string } & {}; type MappedRaw

X Description: TypeScript Version: 3.6.0-dev.20190801 Search Terms: inference intersection type strictFunctionTypes Code type MappedIntersection<T extends {}> = { [P in keyof T]: string } & {}; type Map...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect inference of arrow function with intersected mapped type argument under strictFunctionTypes","articleBody":"\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  3.6.0-dev.20190801\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:** `inference` `intersection type` `strictFunctionTypes`\r\n\r\n**Code**\r\n\r\n```ts\r\ntype MappedIntersection\u003cT extends {}> = { [P in keyof T]: string } & {};\r\ntype MappedRaw\u003cT extends {}> = { [P in keyof T]: string };\r\n\r\n// Case 1: Intersection + no arrow = succeed\r\ntype ToInferNoArrowIntersection\u003cT extends {}> = {\r\n    fn(params: MappedIntersection\u003cT>): void;\r\n};\r\n\r\ntype NoArrowIntersection\u003cT extends ToInferNoArrowIntersection\u003cany>> = void;\r\ndeclare const case1: NoArrowIntersection\u003c{\r\n    fn: (params: MappedIntersection\u003c{a: 1}>) => string,\r\n}>;\r\n\r\n\r\n// Case 2: No intersection + arrow = succeed\r\ntype ToInferArrowNoIntersection\u003cT extends {}> = {\r\n    fn: (params: MappedRaw\u003cT>) => void;\r\n};\r\n\r\ntype ArrowNoIntersection\u003cT extends ToInferArrowNoIntersection\u003cany>> = void;\r\ndeclare const case2: ArrowNoIntersection\u003c{\r\n    fn: (params: MappedRaw\u003c{a: 1}>) => void,\r\n}>;\r\n\r\n\r\n// Case 3: Intersection + arrow = fail\r\ntype ToInferArrowIntersection\u003cT extends {}> = {\r\n    fn: (params: MappedIntersection\u003cT>) => void;\r\n};\r\n\r\ntype ArrowIntersection\u003cT extends ToInferArrowIntersection\u003cany>> = void;\r\ndeclare const case3: ArrowIntersection\u003c{ // Fails here\r\n    fn: (params: MappedIntersection\u003c{a: 1}>) => void,\r\n}>;\r\n```\r\n\r\n**Expected behavior:**\r\nExpected case 3 to succeed.\r\n\r\n**Actual behavior:**\r\nCase 3 produces:\r\n```\r\n Type '{ fn: (params: { a: string; }) => void; }' does not satisfy the constraint 'ToInferArrowIntersection\u003cany>'.\r\n  Types of property 'fn' are incompatible.\r\n    Type '(params: { a: string; }) => void' is not assignable to type '(params: { [x: string]: string; }) => void'.\r\n      Types of parameters 'params' and 'params' are incompatible.\r\n        Property 'a' is missing in type '{ [x: string]: string; }' but required in type '{ a: string; }'.\r\n```\r\nSeems relevant that compilation succeeds without `strictFunctionTypes`\r\n\r\n\r\n**Playground Link:** [Playground](https://www.typescriptlang.org/play/#code/C4TwDgpgBAsghmSATAkgO2BATgZwgY2AEsB7NAHgBUoIAPTNJHKAbwF8A+KAXlagG0AClCJooAawggSAMyiUAugC4oOYFlEBzKGygAyVmwDcAKFCRYCZACU4Adyo16ERs3ZdeLAcNESps+WVVdS0dUxMAegioAGE4PCgARhV0TFwCYjIoAGooNBIoOCwsEjseVQBXfHwICCQzcGhKEnQZbAA5EgBBYtLU7DxCUgpqOgYmQw9WEyhZqBk0AAowIrgAWxwVeEQ6-vShsioOAEoVADcSIiRTYxMGi06ekrs9wcyRp3HmZtaO7t6XhgBhlhuQ4GgQBwphcrqYkAQADZFaD4MhqKD4eIQZJQR4A14gw4sGZzBYqZarDZbKy7IH7d7kFhwFSJTjHHhcNQaNCaAA0Jk44Ui0TiCQATCpOiI6W9hjlCgDyjgqjU6vcmi00G0sE9Sp0CQcPmMXBN3OViXN5mhySssOtNpYdkhbA5KCcOVAYdcBeFzNBdXZ9TLCUbnK55JrtQGg2lZYdwZDoZdvfD8EisCi0cAMViJVBo5rYyHGSTZmSoBS7VTHTZ7IzmUk2R6vfzBXdhbEsVAAMwpYOG+VFZ7lGRwIgI9UR346-H9hmjMOmzjm0tWm2Uh3bZAG+fu7hcL03X2NfOzouGxzG8M-LXYAM70EJqHlQ8mVPpzNodGYvC90-PB8iVXctK3taknUAigmRZJt909ZNWw4UwgA)\r\n\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? -->\r\nhttps://github.com/microsoft/TypeScript/issues/29123#issuecomment-453884098\r\nhttps://github.com/microsoft/TypeScript/issues/31081","author":{"url":"https://github.com/smoogly","@type":"Person","name":"smoogly"},"datePublished":"2019-08-01T18:42:43Z","url":"https://github.com/microsoft/TypeScript/issues/32664"}

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/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1aec2762-49f7-52dd-1a65-51b50d6cd5f9
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCB88:842EC:2BFB8EF:3AADA50:6B01CE9F
html-safe-nonce0500c5330932118374537b2483233c79ce6072d1397c013a23e9f49c05d2947c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQjg4Ojg0MkVDOjJCRkI4RUY6M0FBREE1MDo2QjAxQ0U5RiIsInZpc2l0b3JfaWQiOiIyMTkyMzIyNDQyNjQ1NTg5NjYzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac460adb92008254a954dd3b4b40a19f2dd5b9de4e5133f670044cf8f224e5b07d
hovercard-subject-tagissue:475832266
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/32664/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5d420fa30a81be0efa679c7dc7848291b7df7a70310853efdb69461807ab0e40/microsoft/TypeScript/issues/32664
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5d420fa30a81be0efa679c7dc7848291b7df7a70310853efdb69461807ab0e40/microsoft/TypeScript/issues/32664
og:image:altTypeScript Version: 3.6.0-dev.20190801 Search Terms: inference intersection type strictFunctionTypes Code type MappedIntersection = { [P in keyof T]: string } & {}; type MappedRaw
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesmoogly
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/32664#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F32664
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%2Fissues%2F32664
Sign uphttps://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/32664
Reloadhttps://github.com/microsoft/TypeScript/issues/32664
Reloadhttps://github.com/microsoft/TypeScript/issues/32664
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
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/32664
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/32664
Incorrect inference of arrow function with intersected mapped type argument under strictFunctionTypeshttps://github.com/microsoft/TypeScript/issues/32664#top
https://github.com/weswigham
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
https://github.com/smoogly
Arseny Smoogly (smoogly)https://github.com/smoogly
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issue-475832266
Playgroundhttps://www.typescriptlang.org/play/#code/C4TwDgpgBAsghmSATAkgO2BATgZwgY2AEsB7NAHgBUoIAPTNJHKAbwF8A+KAXlagG0AClCJooAawggSAMyiUAugC4oOYFlEBzKGygAyVmwDcAKFCRYCZACU4Adyo16ERs3ZdeLAcNESps+WVVdS0dUxMAegioAGE4PCgARhV0TFwCYjIoAGooNBIoOCwsEjseVQBXfHwICCQzcGhKEnQZbAA5EgBBYtLU7DxCUgpqOgYmQw9WEyhZqBk0AAowIrgAWxwVeEQ6-vShsioOAEoVADcSIiRTYxMGi06ekrs9wcyRp3HmZtaO7t6XhgBhlhuQ4GgQBwphcrqYkAQADZFaD4MhqKD4eIQZJQR4A14gw4sGZzBYqZarDZbKy7IH7d7kFhwFSJTjHHhcNQaNCaAA0Jk44Ui0TiCQATCpOiI6W9hjlCgDyjgqjU6vcmi00G0sE9Sp0CQcPmMXBN3OViXN5mhySssOtNpYdkhbA5KCcOVAYdcBeFzNBdXZ9TLCUbnK55JrtQGg2lZYdwZDoZdvfD8EisCi0cAMViJVBo5rYyHGSTZmSoBS7VTHTZ7IzmUk2R6vfzBXdhbEsVAAMwpYOG+VFZ7lGRwIgI9UR346-H9hmjMOmzjm0tWm2Uh3bZAG+fu7hcL03X2NfOzouGxzG8M-LXYAM70EJqHlQ8mVPpzNodGYvC90-PB8iVXctK3taknUAigmRZJt909ZNWw4UwgA
#29123 (comment)https://github.com/microsoft/TypeScript/issues/29123#issuecomment-453884098
#31081https://github.com/microsoft/TypeScript/issues/31081
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#event-2527863815
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Wesley Wigham (weswigham)https://github.com/weswigham
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#event-2527863889
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517471270
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517472071
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517472471
#32225https://github.com/microsoft/TypeScript/pull/32225
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517472617
https://github.com/smoogly
Arseny Smoogly (smoogly)https://github.com/smoogly
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517473844
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517474457
https://github.com/smoogly
Arseny Smoogly (smoogly)https://github.com/smoogly
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517475948
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517477401
Wesley Wigham (@weswigham)https://github.com/weswigham
https://github.com/smoogly
Arseny Smoogly (smoogly)https://github.com/smoogly
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517478516
Jack Williams (@jack-williams)https://github.com/jack-williams
https://github.com/fatcerberus
Bruce Pascoe (fatcerberus)https://github.com/fatcerberus
on Aug 1, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517495802
Arseny Smoogly (@smoogly)https://github.com/smoogly
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
on Aug 2, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517646736
Arseny Smoogly (@smoogly)https://github.com/smoogly
https://github.com/smoogly
Arseny Smoogly (smoogly)https://github.com/smoogly
on Aug 2, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517651411
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Aug 2, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-517858183
#32225https://github.com/microsoft/TypeScript/pull/32225
https://github.com/jack-williams
Jack Williams (jack-williams)https://github.com/jack-williams
on Aug 5, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-518166385
Wesley Wigham (@weswigham)https://github.com/weswigham
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Aug 5, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-518318932
https://github.com/fatcerberus
Bruce Pascoe (fatcerberus)https://github.com/fatcerberus
on Aug 5, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-518373736
https://github.com/weswigham
Wesley Wigham (weswigham)https://github.com/weswigham
on Aug 5, 2019https://github.com/microsoft/TypeScript/issues/32664#issuecomment-518380189
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/32664
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/32664
Wesley Wigham (weswigham)https://github.com/weswigham
Needs InvestigationThis issue needs a team member to investigate its status.https://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%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.