René's URL Explorer Experiment


Title: Inferred return type of a generic function with destructure incorrectly retains generics · Issue #33823 · microsoft/TypeScript · GitHub

Open Graph Title: Inferred return type of a generic function with destructure incorrectly retains generics · Issue #33823 · microsoft/TypeScript

X Title: Inferred return type of a generic function with destructure incorrectly retains generics · Issue #33823 · microsoft/TypeScript

Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Inferred return type of a generic function with destructure incorrectly retains generics · Issue #33823 · microsoft/TypeScript

Open Graph Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Inferred return type of a generic function with destructure incorrectly retains generics · Issue #33823 · microsof...

X Description: TypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Inferred return type of a generic function with destructure incorrectly retains generics · Issue #33823 · microsof...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inferred return type of a generic function with destructure incorrectly retains generics","articleBody":"\u003c!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨\r\n\r\nHalf of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common \"Bugs\" That Aren't Bugs section!\r\n\r\nPlease help us by doing the following steps before logging an issue:\r\n  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues\r\n  * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n\r\nPlease fill in the *entire* template below.\r\n-->\r\n\r\n\u003c!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->\r\n**TypeScript Version:**  3.6.3, 3.7-Beta\r\n\r\n\u003c!-- Search terms you tried before logging this (so others can find this issue more easily) -->\r\n**Search Terms:**\r\n- generic function infer return type\r\n- generic function destructure\r\n\r\n**Code**\r\n\r\nMinimal reproducible example:\r\n\r\n```ts\r\ninterface TestGeneric\u003cTG> {\r\n  f: string\r\n  g: TG\r\n}\r\n\r\nconst removeF = \u003cTX>({ f, ...rest }: TestGeneric\u003cTX>) => {\r\n  return rest\r\n}\r\n\r\nconst result: number = removeF\u003cnumber>({ f: '', g: 3 }).g\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nNo type errors\r\n\r\n**Actual behavior:**\r\n\r\n```\r\nType 'TX' is not assignable to type 'number'\r\n```\r\n\r\n**Playground Link:** \u003c!-- A link to a TypeScript Playground \"Share\" link which demonstrates this behavior -->\r\nhttps://www.typescriptlang.org/play/index.html?ts=3.7-Beta&ssl=10&ssc=58&pln=1&pc=1#code/JYOwLgpgTgZghgYwgAgCoQM5gOIRNYBAHlWwD5kBvAWAChlkYAuZLKUAczoY5dLoC+dOggD2ILMigQAtqIBuEAGLIAvMhIANMgApKjADTIAdKemSBfTDjwFiqbQEo1FGvSkQwAVyggPWQWFaMQkwfy8AGzAWEC8ZACNoNQ85RSUiWIToXX1mZAByfKNeZABmZAFHYy5aIA\r\n\r\n**Related Issues:** \u003c!-- Did you find other bugs that looked similar? --> #33579 #28234\r\n","author":{"url":"https://github.com/syy1125","@type":"Person","name":"syy1125"},"datePublished":"2019-10-04T23:42:23Z","url":"https://github.com/microsoft/TypeScript/issues/33823"}

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/issues/:id(.:format)
route-controllerissues
route-actionshow
fetch-noncev2:49c530d9-a20a-4395-e177-3366a8276767
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC292:27D3AD:2EC3C83:3B61A65:6B01BDFF
html-safe-nonce54430db42e625b78eccfd8aa7a06718cc4288e45aaa0cae996ecadf0dcfcafe0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjkyOjI3RDNBRDoyRUMzQzgzOjNCNjFBNjU6NkIwMUJERkYiLCJ2aXNpdG9yX2lkIjoiNDQwNTAwMTI0MTc3MjUzOTM5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaccd6853a00b672c507843be9e7c85592cf69819c1b5a169b535631c1a72f42447
hovercard-subject-tagrepository:20929025
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///issues/show
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/microsoft/TypeScript/issues/33823
twitter:imagehttps://opengraph.githubassets.com/47cde802d3847ff7ce61448bd4f8c3272d012c9a3f2b9085b71a67530bf7bbd6/microsoft/TypeScript
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/47cde802d3847ff7ce61448bd4f8c3272d012c9a3f2b9085b71a67530bf7bbd6/microsoft/TypeScript
og:image:altTypeScript is a superset of JavaScript that compiles to clean JavaScript output. - Inferred return type of a generic function with destructure incorrectly retains generics · Issue #33823 · microsof...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-cache
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/33823#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F33823
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%2F33823
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fissues%2Fshow&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/33823
Reloadhttps://github.com/microsoft/TypeScript/issues/33823
Reloadhttps://github.com/microsoft/TypeScript/issues/33823
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/33823
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/33823
#34826https://github.com/microsoft/TypeScript/pull/34826
Inferred return type of a generic function with destructure incorrectly retains genericshttps://github.com/microsoft/TypeScript/issues/33823#top
#34826https://github.com/microsoft/TypeScript/pull/34826
https://github.com/ahejlsberg
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
TypeScript 3.8.0https://github.com/microsoft/TypeScript/milestone/102
https://github.com/syy1125
Jack Sun (syy1125)https://github.com/syy1125
on Oct 4, 2019https://github.com/microsoft/TypeScript/issues/33823#issue-502885611
https://www.typescriptlang.org/play/index.html?ts=3.7-Beta&ssl=10&ssc=58&pln=1&pc=1#code/JYOwLgpgTgZghgYwgAgCoQM5gOIRNYBAHlWwD5kBvAWAChlkYAuZLKUAczoY5dLoC+dOggD2ILMigQAtqIBuEAGLIAvMhIANMgApKjADTIAdKemSBfTDjwFiqbQEo1FGvSkQwAVyggPWQWFaMQkwfy8AGzAWEC8ZACNoNQ85RSUiWIToXX1mZAByfKNeZABmZAFHYy5aIAhttps://www.typescriptlang.org/play/index.html?ts=3.7-Beta&ssl=10&ssc=58&pln=1&pc=1#code/JYOwLgpgTgZghgYwgAgCoQM5gOIRNYBAHlWwD5kBvAWAChlkYAuZLKUAczoY5dLoC+dOggD2ILMigQAtqIBuEAGLIAvMhIANMgApKjADTIAdKemSBfTDjwFiqbQEo1FGvSkQwAVyggPWQWFaMQkwfy8AGzAWEC8ZACNoNQ85RSUiWIToXX1mZAByfKNeZABmZAFHYy5aIA
#33579https://github.com/microsoft/TypeScript/issues/33579
#28234https://github.com/microsoft/TypeScript/pull/28234
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
on Oct 17, 2019https://github.com/microsoft/TypeScript/issues/33823#event-2722568647
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Oct 17, 2019https://github.com/microsoft/TypeScript/issues/33823#event-2722568723
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.8.0https://github.com/microsoft/TypeScript/milestone/102
on Oct 17, 2019https://github.com/microsoft/TypeScript/issues/33823#event-2722568855
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
on Oct 30, 2019https://github.com/microsoft/TypeScript/issues/33823#event-2755767321
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#34826https://github.com/microsoft/TypeScript/pull/34826
on Nov 5, 2019https://github.com/microsoft/TypeScript/issues/33823#event-2772786966
microsofthttps://github.com/microsoft
on Oct 21, 2025https://github.com/microsoft/TypeScript/issues/33823#event-20416794309
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/33823
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/33823
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Fix AvailableA PR has been opened for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fix%20Available%22
TypeScript 3.8.0https://github.com/microsoft/TypeScript/milestone/102
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.