René's URL Explorer Experiment


Title: extends clause leaks temporary type · Issue #31099 · microsoft/TypeScript · GitHub

Open Graph Title: extends clause leaks temporary type · Issue #31099 · microsoft/TypeScript

X Title: extends clause leaks temporary type · Issue #31099 · microsoft/TypeScript

Description: TypeScript Version: 3.5.0-dev.20190420 Code // type Weird = U type Weird = any extends infer U ? U : never; // Type 'null' is not assignable to type 'U'. const a: Weird = null; // Type 'U' is not assignable to type 'string'. const b: str...

Open Graph Description: TypeScript Version: 3.5.0-dev.20190420 Code // type Weird = U type Weird = any extends infer U ? U : never; // Type 'null' is not assignable to type 'U'. const a: Weird = null; // Type 'U' is not a...

X Description: TypeScript Version: 3.5.0-dev.20190420 Code // type Weird = U type Weird = any extends infer U ? U : never; // Type 'null' is not assignable to type 'U'. const a: Weird = null; // T...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"extends clause leaks temporary type","articleBody":"**TypeScript Version:** 3.5.0-dev.20190420\r\n\r\n**Code**\r\n\r\n```ts\r\n// type Weird = U\r\ntype Weird = any extends infer U ? U : never;\r\n\r\n// Type 'null' is not assignable to type 'U'.\r\nconst a: Weird = null;\r\n\r\n// Type 'U' is not assignable to type 'string'.\r\nconst b: string = a;\r\n\r\n// type AlsoWeird = U\r\ntype AlsoWeird = unknown extends infer U ? U : never;\r\n```\r\n\r\n**Expected behavior:** Infer some type\r\n\r\n**Actual behavior:** The extends clause leaks a temporary type U. Happens for `any` and `unknown`\r\n\r\n**Playground Link:** [Playground](https://www.typescriptlang.org/play/#src=%2F%2F%20type%20Weird%20%3D%20U%0D%0Atype%20Weird%20%3D%20any%20extends%20infer%20U%20%3F%20U%20%3A%20never%3B%0D%0A%0D%0A%2F%2F%20Type%20'null'%20is%20not%20assignable%20to%20type%20'U'.%0D%0Aconst%20a%3A%20Weird%20%3D%20null%3B%0D%0A%0D%0A%2F%2F%20Type%20'U'%20is%20not%20assignable%20to%20type%20'string'.%0D%0Aconst%20b%3A%20string%20%3D%20a%3B%0D%0A%0D%0A%2F%2F%20type%20AlsoWeird%20%3D%20U%0D%0Atype%20AlsoWeird%20%3D%20unknown%20extends%20infer%20U%20%3F%20U%20%3A%20never%3B)\r\n","author":{"url":"https://github.com/SimonMeskens","@type":"Person","name":"SimonMeskens"},"datePublished":"2019-04-24T22:42:38.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/31099/TypeScript/issues/31099"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:84e107d8-1674-fda7-dfeb-7fc2e86c9117
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE122:356904:AD54AF:E63EEF:6A62B4A9
html-safe-nonce41cdf7bb9d8edc578910a8abed2071aee55a0ab494acb8dc1450c5002e8951ab
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTIyOjM1NjkwNDpBRDU0QUY6RTYzRUVGOjZBNjJCNEE5IiwidmlzaXRvcl9pZCI6IjUzOTc4NzUyODI2MTkzMTUzNjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac9453e1adbdf6179852de9fab7beb1e8cf1981843a1fd5edc0a12bda515a079c1
hovercard-subject-tagissue:436937850
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/31099/issue_layout
twitter:imagehttps://opengraph.githubassets.com/bbcdb21a85497e70193f9dee9c86d2659fd3fae3cb7f74d5e91e9c7e659807f6/microsoft/TypeScript/issues/31099
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/bbcdb21a85497e70193f9dee9c86d2659fd3fae3cb7f74d5e91e9c7e659807f6/microsoft/TypeScript/issues/31099
og:image:altTypeScript Version: 3.5.0-dev.20190420 Code // type Weird = U type Weird = any extends infer U ? U : never; // Type 'null' is not assignable to type 'U'. const a: Weird = null; // Type 'U' is not a...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameSimonMeskens
hostnamegithub.com
expected-hostnamegithub.com
None2738d7125e864b55224a8bc40c72c220ca7d2c73f91a7bb8d69dffe9d35e997d
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
releasebf54af498459157b66a67136f992a68752cdbb54
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/31099#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F31099
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%2F31099
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/31099
Reloadhttps://github.com/microsoft/TypeScript/issues/31099
Reloadhttps://github.com/microsoft/TypeScript/issues/31099
Please reload this pagehttps://github.com/microsoft/TypeScript/issues/31099
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
#31137https://github.com/microsoft/TypeScript/pull/31137
extends clause leaks temporary typehttps://github.com/microsoft/TypeScript/issues/31099#top
#31137https://github.com/microsoft/TypeScript/pull/31137
https://github.com/ahejlsberg
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: check: Type InferenceRelated to type inference performed during signature resolution or `infer` type resolutionhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20check%3A%20Type%20Inference%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
TypeScript 3.5.0https://github.com/microsoft/TypeScript/milestone/89
https://github.com/SimonMeskens
SimonMeskenshttps://github.com/SimonMeskens
on Apr 24, 2019https://github.com/microsoft/TypeScript/issues/31099#issue-436937850
Playgroundhttps://www.typescriptlang.org/play/#src=%2F%2F%20type%20Weird%20%3D%20U%0D%0Atype%20Weird%20%3D%20any%20extends%20infer%20U%20%3F%20U%20%3A%20never%3B%0D%0A%0D%0A%2F%2F%20Type%20'null'%20is%20not%20assignable%20to%20type%20'U'.%0D%0Aconst%20a%3A%20Weird%20%3D%20null%3B%0D%0A%0D%0A%2F%2F%20Type%20'U'%20is%20not%20assignable%20to%20type%20'string'.%0D%0Aconst%20b%3A%20string%20%3D%20a%3B%0D%0A%0D%0A%2F%2F%20type%20AlsoWeird%20%3D%20U%0D%0Atype%20AlsoWeird%20%3D%20unknown%20extends%20infer%20U%20%3F%20U%20%3A%20never%3B
ahejlsberghttps://github.com/ahejlsberg
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
Domain: check: Type InferenceRelated to type inference performed during signature resolution or `infer` type resolutionhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Domain%3A%20check%3A%20Type%20Inference%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
TypeScript 3.5.0https://github.com/microsoft/TypeScript/milestone/89
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.