René's URL Explorer Experiment


Title: Type Instantiation is Excessively Deep Regression In #56004 · Issue #59667 · microsoft/TypeScript · GitHub

Open Graph Title: Type Instantiation is Excessively Deep Regression In #56004 · Issue #59667 · microsoft/TypeScript

X Title: Type Instantiation is Excessively Deep Regression In #56004 · Issue #59667 · microsoft/TypeScript

Description: 🔎 Search Terms Type Instantiation is Excessively Deep, #56004 🕗 Version & Regression Information This changed in commit 38ef79e ⏯ Playground Link https://www.typescriptlang.org/play/?#code/C4TwDgpgBAQg9gExAYQBYQMYGsDOAJCAJwEtgBDAcwgB4B5A...

Open Graph Description: 🔎 Search Terms Type Instantiation is Excessively Deep, #56004 🕗 Version & Regression Information This changed in commit 38ef79e ⏯ Playground Link https://www.typescriptlang.org/play/?#code/C4TwDgpg...

X Description: 🔎 Search Terms Type Instantiation is Excessively Deep, #56004 🕗 Version & Regression Information This changed in commit 38ef79e ⏯ Playground Link https://www.typescriptlang.org/play/?#code/C4Tw...

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

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Type Instantiation is Excessively Deep Regression In #56004","articleBody":"### 🔎 Search Terms\n\nType Instantiation is Excessively Deep, #56004\n\n### 🕗 Version & Regression Information\n\nThis changed in commit 38ef79e0b02ad122b984a19f3494414e4e53c896\n\n### ⏯ Playground Link\n\nhttps://www.typescriptlang.org/play/?#code/C4TwDgpgBAQg9gExAYQBYQMYGsDOAJCAJwEtgBDAcwgB4B5APigF4paoIAPYCAOwRygAFADZkMEMgCNhEWpIBWmYFAD8rKAC4oPCADciAbgBQoSFGRweOYITLEewNJlwES5KnXZde-IaPFSMnKKGMCMLGQ8IMZGAPSxUAByZAC20CkArtZe3HxQOHBpwKj2FFDEAHQQFVAABgDiEI6WAGbEFBmEEAjUyWnhUBVDtVAYhWDEMgKSGcrFxAIIcBA4PADkwBUm4NCNzTxtHV09fdCcub6RIAMWVjZ2Dk7Y+ESklDRGULCIKOjPrm8PJ8vlB4uZUJEKKUoPMBMA4HVTjkfAIAEQAQRSkmIvGAABl2qhgKjVFBMdjcQSKETNFAACpwLC8EZtDgrGHoUbjSZkYDESxbEFQACSd0i4jpO2owKFSPOKKgGKxOIcVKJJLUpggcBaZOVlMJyi0Wp19MZvBlUHowOt9BiYPRMJ2UDAZFsRSI5QEXQAjhliMcoC04IQOQsuSkJqI+ZYg3ZhJ1qiLlBhIlBJNAst0oJEEPk+cJhHHJjCEWNI5NoDNlMRdaQ1t6ICk4Po87iAxBhCByinuVMtghMKIuqNRDgBCIxBJpLIFEpqABVHhZvMRKKMADewLBDOLRfhEaj6SyvYcDxzPCgcDAMZ4ZCLYEI16IoA5vKgXRaRDhCNqsNqgo5ioxolDgMRfDuoEuk+kCEK+nALMAP5QAgtZfl0DjELy0AtE+KQctAWp1BuAC+IzVj2XrrMoYjABk95dtomArDgbrdgeqZZgRh48ree6JoBADEPBwMAACikagMahAZBAxgkUYcQJLuOCoHAADuYYCOWUa8vyl4tPGibcRgY7aXAGTCHmwikEQDHdhmUDyCedSmWQ456hSqqGlApEAcmUAQshCHZMUFnUgOQ5utAbkeeSKr4j58p8BO-jTkEc6hL5wLCaJEk3iA0myfJimDm5I6xQIDJMpeyW+JOAQzsESjZRBCQALIuZ+noHpEonoKGj7PnBIA1H+oEjPeljQAs1HsCJGQRcCkggQsADaqIYKiAC64GggktA8IxIVIaW6bQN1hCBvCNR0pgqA8MQqaFt2IAWVyll5l0zb6FpF55sU0Copw4jjsQ+iMYOEBgCSRBPqGSwrHNFAImQ6lkKN24JHgGl6D1EIpmQWYCH1gOhjpvH6ewV0hoBGBaMuWKGEYJFAA\n\n### 💻 Code\n\n```ts\r\ntype BodyChecksHeritage\u003cO> = O extends PlaceableObject ? O : never;\r\ntype ConstraintChecksHeritage\u003cO extends PlaceableObject> = any;\r\n\r\n// Name must extend something i.e. `GetConfigured\u003cName> = ...` compiles but this doesn't.\r\ntype GetConfigured\u003cName extends any> = ConstraintChecksHeritage\u003c\r\n  BodyChecksHeritage\u003c\r\n    // Changing this to `Name extends \"AmbientLight\" ? AmbientLight : Token` fixes the compilation.\r\n    InstanceType\u003c\r\n      Name extends \"AmbientLight\" ? typeof AmbientLight : typeof Token\r\n    >\r\n  >\r\n>;\r\n\r\n// A type parameter is required for this compilation failure. It can be used and still fail to compile but if it's removed entirely it compiles.\r\ndeclare class PlaceableObject\u003cUnused = any> {\r\n  // To fail to compile must contain an optional property that refers to `this`.\r\n  a?: this;\r\n\r\n  // This property exists to differentiate from the type `{}` but it isn't actually necessary to cause the compilation failure.\r\n  #notEmpty: true;\r\n}\r\n\r\n// To show this compilation failure the class could literally be just `class AmbientLight {}`. It has to exist though.\r\ndeclare class AmbientLight extends PlaceableObject {\r\n  #notEmpty: true;\r\n}\r\n\r\ndeclare class Token extends PlaceableObject {\r\n  // Must refer to another property. `this` alone isn't enough.\r\n  b: this[\"c\"];\r\n\r\n  // Only exists to be referred to. Technically you could remove this and the \"excessively deep\" error doesn't go away.\r\n  // However that causes another compilation error.\r\n  c: number;\r\n}\r\n```\r\n\n\n### 🙁 Actual behavior\n\nGets the error \"Type instantiation is excessively deep and possibly infinite.\"\n\n### 🙂 Expected behavior\n\nNo error.\n\n### Additional information about the issue\n\nI've seen somewhat similar issues reported about this PR but none of them seemed to match my issue. However some were closed without reproduction and maybe I'm having the same problem as [type-fest is?](https://github.com/microsoft/TypeScript/pull/56004#issuecomment-1914382123)\r\n\r\nI've reduced the code down from a large project into this which is why it seems utterly contrived. A few of the odd requirements seem to be explainable:\r\n- `Name extends any` is required because #56004 only operates in cases where the type parameter is constrained.\r\n- `BodyChecksHeritage` and `ConstraintChecksHeritage` are both required to increase the depth.\r\n\r\nBut that leaves some things I can't personally explain such as:\r\n- Why is `a?: this` causing issues but `a: this | undefined` or others don't necessarily?\r\n- Why does `PlaceableObject` have to be generic?\r\n- etc.\r\n\r\nI've noted more oddities inline with the code.","author":{"url":"https://github.com/LukeAbby","@type":"Person","name":"LukeAbby"},"datePublished":"2024-08-17T11:49:08Z","url":"https://github.com/microsoft/TypeScript/issues/59667"}

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:0ab34445-e66b-dad0-e06f-9cf2716257c1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA920:F8826:E27DB8:127E417:6B04E849
html-safe-noncefceb821d35ff61dd87f593ef070a15c81977bdc58a07d7b8caba2ad2f5aa3e04
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTIwOkY4ODI2OkUyN0RCODoxMjdFNDE3OjZCMDRFODQ5IiwidmlzaXRvcl9pZCI6IjQ0NDY3ODc0ODExMDY3MDQ0NTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd4b37068795678ca7bf6ea838a18d494ad0fdab33816fb2b2d9abfcc5073aebf
hovercard-subject-tagissue:2471492446
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/59667/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ef049bfe5d2a2cd76eb2202d9061f8324a89501843dee462ce4f4902a0fb8731/microsoft/TypeScript/issues/59667
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ef049bfe5d2a2cd76eb2202d9061f8324a89501843dee462ce4f4902a0fb8731/microsoft/TypeScript/issues/59667
og:image:alt🔎 Search Terms Type Instantiation is Excessively Deep, #56004 🕗 Version & Regression Information This changed in commit 38ef79e ⏯ Playground Link https://www.typescriptlang.org/play/?#code/C4TwDgpg...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameLukeAbby
hostnamegithub.com
expected-hostnamegithub.com
Nonef3851aad500d8e8dce736722ddc6fa9596e17d9fce3c53581eba968664c0bc32
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
releasee29c922455fd8137f27e1cfcdf6a1e8b920b1926
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/59667#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F59667
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%2F59667
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/59667
Reloadhttps://github.com/microsoft/TypeScript/issues/59667
Reloadhttps://github.com/microsoft/TypeScript/issues/59667
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests319 (319)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/59667
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/59667
Type Instantiation is Excessively Deep Regression In #56004https://github.com/microsoft/TypeScript/issues/59667#top
https://github.com/ahejlsberg
Needs Investigationhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
https://github.com/LukeAbby
LukeAbbyhttps://github.com/LukeAbby
on Aug 17, 2024https://github.com/microsoft/TypeScript/issues/59667#issue-2471492446
#56004https://github.com/microsoft/TypeScript/pull/56004
38ef79ehttps://github.com/microsoft/TypeScript/commit/38ef79e0b02ad122b984a19f3494414e4e53c896
https://www.typescriptlang.org/play/?#code/C4TwDgpgBAQg9gExAYQBYQMYGsDOAJCAJwEtgBDAcwgB4B5APigF4paoIAPYCAOwRygAFADZkMEMgCNhEWpIBWmYFAD8rKAC4oPCADciAbgBQoSFGRweOYITLEewNJlwES5KnXZde-IaPFSMnKKGMCMLGQ8IMZGAPSxUAByZAC20CkArtZe3HxQOHBpwKj2FFDEAHQQFVAABgDiEI6WAGbEFBmEEAjUyWnhUBVDtVAYhWDEMgKSGcrFxAIIcBA4PADkwBUm4NCNzTxtHV09fdCcub6RIAMWVj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.com/microsoft/TypeScript/pull/56004#issuecomment-1914382123
Improve constraints of conditional types applied to constrained type variables #56004https://github.com/microsoft/TypeScript/pull/56004
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Needs Investigationhttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Needs%20Investigation%22
on Aug 19, 2024https://github.com/microsoft/TypeScript/issues/59667#event-13935711953
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
on Aug 19, 2024https://github.com/microsoft/TypeScript/issues/59667#event-13935712570
https://github.com/ttrpgfroth
ttrpgfrothhttps://github.com/ttrpgfroth
on Oct 23, 2024https://github.com/microsoft/TypeScript/issues/59667#issuecomment-2432688947
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/59667
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/59667
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Needs Investigationhttps://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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.