René's URL Explorer Experiment


Title: Type 'null' is not assignable to type 'T extends T ? null : Omit' · Issue #60076 · microsoft/TypeScript · GitHub

Open Graph Title: Type 'null' is not assignable to type 'T extends T ? null : Omit' · Issue #60076 · microsoft/TypeScript

X Title: Type 'null' is not assignable to type 'T extends T ? null : Omit' · Issue #60076 · microsoft/TypeScript

Description: 🔎 Search Terms "conditional type equality", "transitive generic type equality" 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed https://github.com/Microsoft/TypeScript/wiki/FAQ ⏯ Playground...

Open Graph Description: 🔎 Search Terms "conditional type equality", "transitive generic type equality" 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed https://github.com/Mi...

X Description: 🔎 Search Terms "conditional type equality", "transitive generic type equality" 🕗 Version & Regression Information This is the behavior in every version I tried, and I review...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type 'null' is not assignable to type 'T extends T ? null : Omit\u003cT, keyof T>'","articleBody":"### 🔎 Search Terms\n\n\"conditional type equality\", \"transitive generic type equality\"\n\n### 🕗 Version & Regression Information\n\n- This is the behavior in every version I tried, and I reviewed https://github.com/Microsoft/TypeScript/wiki/FAQ\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play/?ts=5.7.0-dev.20240926#code/C4TwDgpgBAKhC2YA2BDYEA8MB8UC8UAFGCgE4rwDOAXLAJT64BuA9gJYAmA3AFA9sA7dKQBmKAMbQAQoI6CA5gAUyFSlADePKFHgRKlFPIi1KwUgt4BfPoOFjJUAEoQBHCOYFKVVDVqhgPYABZPQMjWjhEVHQMAQBXJCRsKz5xFgFTKAAjWQVI5DRjWAQCmJlXBWVyKlw8P2JvGihyuU8q1QY8XDSMliQIADokFnkG6soB3X1DCDpeHh7M0hc3D3l86KKNwoxnV3dKxtr6knHaPdXD8c7cU9UBgNsQ6aNCeMS5vhE4gXFgNnS2VkWAANFBFFAIAAPdCuNRVf4oJBYbDYQjACIlTYosFgWiKBiabSLYDZFg-DjbdD4Ig3DSWXjaZbAOKkARkilU6AoNQ-ADWAhYAHd2TzilEdhDobCOGoYFAAPxQd5IKC0ADy8DYwFBUD5EBALBE4NRKR431+-0By32pBR6MxEpiOFxETotFYnF82mAxE+1nNPz+APZNtWAHEXAdxEikCB7RjxaVMC7-G7vVASRzXFyaTlXOjcZ8mSt3IQwwdPFywepHkJnmEillyTmsYVLP6vkGraHS6QAMqQcRsERsGOJECEQl+LPNzlt6kEfMcQjLvILiA1qaN2gAchELBYu47jKgFdI5b766dm40deCoRmtDnrZvJ54AfPkYE0djk7XVYbluj7hFA+6HsenznoOEDDqO45xlOXBAA\n\n### 💻 Code\n\n```ts\r\ntype Template\u003cT> = (params: T) => void;\r\n\r\ninterface BindingParams {\r\n  message: string;\r\n}\r\n\r\ninterface RenderingParams {\r\n  printMessage: Template\u003cnull>;\r\n}\r\n\r\nconst bindingTemplate: Template\u003cBindingParams> =\r\n  (params: BindingParams) => console.log(params.message);\r\n\r\nconst renderingTemplate: Template\u003cRenderingParams> =\r\n  (params: RenderingParams) => params.printMessage(null);\r\n\r\nfunction bind\u003cT, P extends Partial\u003cT>>(t: Template\u003cT>, p: P) {\r\n  const boundTemplate = () => {};\r\n  return boundTemplate as unknown as Template\u003cP extends T ? null : Omit\u003cT, keyof P>>;\r\n}\r\n\r\nfunction render\u003cT>(t: Template\u003cT>, p: T): void {\r\n  t(p);\r\n}\r\n\r\nfunction renderGenerically\u003cT>(t: Template\u003cT>, p: T) {\r\n  const boundTemplate = bind(t, p);\r\n  render(renderingTemplate, {printMessage: boundTemplate});\r\n}\r\n\r\nfunction renderSpecifically() {\r\n  const boundTemplate = bind(bindingTemplate, {message: 'foo'});\r\n  render(renderingTemplate, {printMessage: boundTemplate});\r\n}\r\n\r\nrenderGenerically(bindingTemplate, {message: 'foo'});\r\nrenderSpecifically();\r\n```\r\n\n\n### 🙁 Actual behavior\n\nGot the error:\r\n```\r\nType 'null' is not assignable to type 'T extends T ? null : Omit\u003cT, keyof T>'\r\n```\r\n\r\nSeems like the TS compiler should be able to figure out that `T extends T` is `true`?\n\n### 🙂 Expected behavior\n\nNo error. Since `T extends T` should be `true`, `null` should be assignable to `null`\n\n### Additional information about the issue\n\nThis may be related to https://github.com/Microsoft/TypeScript/issues/27024#issue-358956816 (?)","author":{"url":"https://github.com/jacobamills","@type":"Person","name":"jacobamills"},"datePublished":"2024-09-26T18:56:12Z","url":"https://github.com/microsoft/TypeScript/issues/60076"}

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:fb92c3c5-e074-88ed-f0c4-a03315caf85a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB1A8:29AEE8:15B301A:1CE6CBB:6B013656
html-safe-noncecacaee38943625894a88292c97447a25dfe4fa267b35d61b0d5179d4615c3ddf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUE4OjI5QUVFODoxNUIzMDFBOjFDRTZDQkI6NkIwMTM2NTYiLCJ2aXNpdG9yX2lkIjoiNDI3OTgxODQyODQ1MTIwNjc0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac99a765e1dd54a65c5cb36d8f91b5401d64a1a187ae173f8df5a997de52a54389
hovercard-subject-tagissue:2551324885
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/60076/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5cd2aaefb92363a0c83d6254736d369c828d22fcd9b64b343c8ea8d80e9af3e0/microsoft/TypeScript/issues/60076
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5cd2aaefb92363a0c83d6254736d369c828d22fcd9b64b343c8ea8d80e9af3e0/microsoft/TypeScript/issues/60076
og:image:alt🔎 Search Terms "conditional type equality", "transitive generic type equality" 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed https://github.com/Mi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejacobamills
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/60076#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F60076
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%2F60076
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/60076
Reloadhttps://github.com/microsoft/TypeScript/issues/60076
Reloadhttps://github.com/microsoft/TypeScript/issues/60076
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests310 (310)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/60076
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/60076
Type 'null' is not assignable to type 'T extends T ? null : Omit'https://github.com/microsoft/TypeScript/issues/60076#top
Design LimitationConstraints of the existing architecture prevent this from being fixedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%22
https://github.com/jacobamills
jacobamillshttps://github.com/jacobamills
on Sep 26, 2024https://github.com/microsoft/TypeScript/issues/60076#issue-2551324885
https://github.com/Microsoft/TypeScript/wiki/FAQhttps://github.com/Microsoft/TypeScript/wiki/FAQ
https://www.typescriptlang.org/play/?ts=5.7.0-dev.20240926#code/C4TwDgpgBAKhC2YA2BDYEA8MB8UC8UAFGCgE4rwDOAXLAJT64BuA9gJYAmA3AFA9sA7dKQBmKAMbQAQoI6CA5gAUyFSl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Hd2TzilEdhDobCOGoYFAAPxQd5IKC0ADy8DYwFBUD5EBALBE4NRKR431+-0By32pBR6MxEpiOFxETotFYnF82mAxE+1nNPz+APZNtWAHEXAdxEikCB7RjxaVMC7-G7vVASRzXFyaTlXOjcZ8mSt3IQwwdPFywepHkJnmEillyTmsYVLP6vkGraHS6QAMqQcRsERsGOJECEQl+LPNzlt6kEfMcQjLvILiA1qaN2gAchELBYu47jKgFdI5b766dm40deCoRmtDnrZvJ54AfPkYE0djk7XVYbluj7hFA+6HsenznoOEDDqO45xlOXBAA
#27024 (comment)https://github.com/microsoft/TypeScript/issues/27024#issue-358956816
https://github.com/jcalz
Joe Calzaretta (jcalz)https://github.com/jcalz
on Sep 26, 2024https://github.com/microsoft/TypeScript/issues/60076#issuecomment-2377775253
#46429https://github.com/microsoft/TypeScript/pull/46429
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Design LimitationConstraints of the existing architecture prevent this from being fixedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%22
on Sep 26, 2024https://github.com/microsoft/TypeScript/issues/60076#event-14421915366
https://github.com/typescript-bot
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
on Sep 29, 2024https://github.com/microsoft/TypeScript/issues/60076#issuecomment-2381052010
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
not plannedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Sep 29, 2024https://github.com/microsoft/TypeScript/issues/60076#event-14443246053
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/60076
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/60076
Design LimitationConstraints of the existing architecture prevent this from being fixedhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Limitation%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.