René's URL Explorer Experiment


Title: tsc and tsserver have different ideas of excessively deep types · Issue #32573 · microsoft/TypeScript · GitHub

Open Graph Title: tsc and tsserver have different ideas of excessively deep types · Issue #32573 · microsoft/TypeScript

X Title: tsc and tsserver have different ideas of excessively deep types · Issue #32573 · microsoft/TypeScript

Description: TypeScript Version: typescript-3.6.0-insiders.20190725 https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/37759/artifacts?artifactName=tgz&fileId=2A7E3F3E93DD6F833D63A63F3A7A21707B3F57B08FCA5C93A8...

Open Graph Description: TypeScript Version: typescript-3.6.0-insiders.20190725 https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/37759/artifacts?artifactName=tgz&fileId=2A7E3F3E93...

X Description: TypeScript Version: typescript-3.6.0-insiders.20190725 https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/37759/artifacts?artifactName=tgz&fileId=2A7E3F...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"tsc and tsserver have different ideas of excessively deep types","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:**  \r\n\r\n`typescript-3.6.0-insiders.20190725`\r\n\r\nhttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/37759/artifacts?artifactName=tgz&fileId=2A7E3F3E93DD6F833D63A63F3A7A21707B3F57B08FCA5C93A8F1848556D8141F02&fileName=/typescript-3.6.0-insiders.20190725.tgz\r\n\r\nTaken from,\r\nhttps://github.com/microsoft/TypeScript/pull/32028#issuecomment-515234327\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\r\nmax instantiation count, max instantiation depth, tsc, tsserver\r\n\r\n**Code**\r\n\r\nI've reduced the 40-subproject monorepo to just small parts of 2 subprojects.\r\n\r\nHere is a snippet of the problem,\r\n\r\n```ts\r\n\r\n/**\r\n *\r\n * ```json\r\n * //tsconfig-base.json\r\n * \"disableSourceOfProjectReferenceRedirect\": true,\r\n * ```\r\n *\r\n * ```json\r\n * //package.json\r\n * \"typescript\": \"https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/37759/artifacts?artifactName=tgz&fileId=2A7E3F3E93DD6F833D63A63F3A7A21707B3F57B08FCA5C93A8F1848556D8141F02&fileName=/typescript-3.6.0-insiders.20190725.tgz\"\r\n * ```\r\n *\r\n * -----\r\n *\r\n * VS Code: OK!\r\n * Type inference OK!\r\n *\r\n * -----\r\n *\r\n * `tsc` gives me,\r\n *\r\n * ```js\r\n * src/blah.ts:11:21 - error TS2589: Type instantiation is excessively deep and possibly infinite.\r\n *\r\n *  11 export const json = tm.deepMerge(\r\n *                         ~~~~~~~~~~~~~\r\n *  12     base.json,\r\n *     ~~~~~~~~~~~~~~\r\n * ...\r\n *  31     s.convertBlahType.toStr.BLAH\r\n *     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n *  32 );\r\n *     ~\r\n * ```\r\n */\r\nexport const json = tm.deepMerge(\r\n  /*snip*/\r\n);\r\n\r\nconst x = json(\"\", \"\");\r\nif (x.foo != undefined) {\r\n    if (x.foo.bar != undefined) {\r\n        //Correctly infers `string`\r\n        //So, 14M type instantiations is okay with VS code\r\n        x.foo.bar.baz\r\n    }\r\n}\r\n```\r\n\r\n**Expected behavior:**\r\n\r\nIf `tsc` gets the error,\r\n```\r\nTS2589: Type instantiation is excessively deep and possibly infinite.\r\n```\r\n\r\nThen `tsserver` should also get the error\r\n\r\n**Actual behavior:**\r\n\r\n`tsc` gets the error, but `tsserver` does not (or at least VS code infers the type correctly without errors)\r\n\r\n**Playground Link:** \r\n\r\n-None-\r\n\r\n@sheetalkamat \r\n\r\nThe project involved contains code related to a company project.\r\nSo, I really do not want to upload it publicly, if possible.\r\n\r\nI could mangle the variable names so that they're meaningless but if I can just email the parts of the project that are involved, that would be nice.\r\n\r\nRepro steps:\r\n\r\n1. `npm install`\r\n1. `npm run build`\r\n1. See `TS2589: Type instantiation is excessively deep and possibly infinite.`\r\n1. Open VS code\r\n1. Navigate to file `tsc` says contains errors\r\n1. Notice no errors\r\n1. Play with return type of function\r\n1. Notice inference works correctly\r\n\r\n**Related Issues:** \r\n\r\nThe merged PR that introduced the error,\r\nhttps://github.com/microsoft/TypeScript/pull/32079#issuecomment-515334873\r\n\r\nThe build I am testing,\r\nhttps://github.com/microsoft/TypeScript/pull/32028\r\n\r\nAlso relevant, https://github.com/microsoft/TypeScript/issues/29511\r\nIt seems like every few versions, there ends up being a difference between `tsc` and `tsserver`, regarding the max instantiation depth\r\n","author":{"url":"https://github.com/AnyhowStep","@type":"Person","name":"AnyhowStep"},"datePublished":"2019-07-26T07:48:46Z","url":"https://github.com/microsoft/TypeScript/issues/32573"}

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:775dc8fd-8d73-3be7-64af-8d75be263583
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB18C:3F4253:259EB66:321E7D4:6B01A420
html-safe-nonce7e6b1ca4ceb7a8f7023077c22c43de2c0542ba0fbad5e0852fadcb83dbce6ed0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMThDOjNGNDI1MzoyNTlFQjY2OjMyMUU3RDQ6NkIwMUE0MjAiLCJ2aXNpdG9yX2lkIjoiMTUzMDYwNjExNzA3MDE1MjczNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacfa0e408ac69a582009fe42e95fa15de724bc7ca90f181fb1bf50cbd23d65b5b2
hovercard-subject-tagissue:473225055
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/32573/issue_layout
twitter:imagehttps://opengraph.githubassets.com/aba6d80b7f9c7fe343005f09fb3c2d15ed576e95111c64ac1541509ea5fa1c56/microsoft/TypeScript/issues/32573
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/aba6d80b7f9c7fe343005f09fb3c2d15ed576e95111c64ac1541509ea5fa1c56/microsoft/TypeScript/issues/32573
og:image:altTypeScript Version: typescript-3.6.0-insiders.20190725 https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/37759/artifacts?artifactName=tgz&fileId=2A7E3F3E93...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameAnyhowStep
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/32573#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F32573
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%2F32573
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/32573
Reloadhttps://github.com/microsoft/TypeScript/issues/32573
Reloadhttps://github.com/microsoft/TypeScript/issues/32573
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/32573
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/32573
tsc and tsserver have different ideas of excessively deep typeshttps://github.com/microsoft/TypeScript/issues/32573#top
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
Backloghttps://github.com/microsoft/TypeScript/milestone/29
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Jul 26, 2019https://github.com/microsoft/TypeScript/issues/32573#issue-473225055
https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/37759/artifacts?artifactName=tgz&fileId=2A7E3F3E93DD6F833D63A63F3A7A21707B3F57B08FCA5C93A8F1848556D8141F02&fileName=/typescript-3.6.0-insiders.20190725.tgzhttps://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/37759/artifacts?artifactName=tgz&fileId=2A7E3F3E93DD6F833D63A63F3A7A21707B3F57B08FCA5C93A8F1848556D8141F02&fileName=/typescript-3.6.0-insiders.20190725.tgz
#32028 (comment)https://github.com/microsoft/TypeScript/pull/32028#issuecomment-515234327
Sheetal Nandi (@sheetalkamat)https://github.com/sheetalkamat
#32079 (comment)https://github.com/microsoft/TypeScript/pull/32079#issuecomment-515334873
#32028https://github.com/microsoft/TypeScript/pull/32028
#29511https://github.com/microsoft/TypeScript/issues/29511
https://github.com/ajafff
Klaus Meinhardt (ajafff)https://github.com/ajafff
on Jul 26, 2019https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515352462
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Jul 26, 2019https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515355264
Klaus Meinhardt (@ajafff)https://github.com/ajafff
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Jul 26, 2019https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515512215
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Jul 26, 2019https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515519228
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Jul 26, 2019https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515527272
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Jul 26, 2019https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515530494
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Jul 26, 2019https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515531870
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Jul 26, 2019https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515532325
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Jul 26, 2019https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515532751
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 Jul 31, 2019https://github.com/microsoft/TypeScript/issues/32573#event-2524493399
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Wesley Wigham (weswigham)https://github.com/weswigham
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Jul 31, 2019https://github.com/microsoft/TypeScript/issues/32573#event-2524493422
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.7.0https://github.com/microsoft/TypeScript/milestone/98
on Jul 31, 2019https://github.com/microsoft/TypeScript/issues/32573#event-2524493751
https://github.com/AnyhowStep
AnyhowStephttps://github.com/AnyhowStep
on Aug 5, 2019https://github.com/microsoft/TypeScript/issues/32573#issuecomment-518113627
Wesley Wigham (@weswigham)https://github.com/weswigham
#32707 (comment)https://github.com/microsoft/TypeScript/issues/32707#issuecomment-518102872
#32573 (comment)https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515527272
#32573 (comment)https://github.com/microsoft/TypeScript/issues/32573#issuecomment-515532751
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.7.0https://github.com/microsoft/TypeScript/milestone/98
TypeScript 3.7.1https://github.com/microsoft/TypeScript/milestone/105
on Oct 14, 2019https://github.com/microsoft/TypeScript/issues/32573#event-2711290318
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.7.1https://github.com/microsoft/TypeScript/milestone/105
TypeScript 3.8.0https://github.com/microsoft/TypeScript/milestone/102
on Oct 29, 2019https://github.com/microsoft/TypeScript/issues/32573#event-2752754928
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.8.0https://github.com/microsoft/TypeScript/milestone/102
TypeScript 3.8.1https://github.com/microsoft/TypeScript/milestone/107
on Jan 8, 2020https://github.com/microsoft/TypeScript/issues/32573#event-2932087520
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
TypeScript 3.8.1https://github.com/microsoft/TypeScript/milestone/107
Backloghttps://github.com/microsoft/TypeScript/milestone/29
on Jan 23, 2020https://github.com/microsoft/TypeScript/issues/32573#event-2975614815
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
Wesley Wigham (weswigham)https://github.com/weswigham
on Jan 23, 2020https://github.com/microsoft/TypeScript/issues/32573#event-2975614890
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/32573
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/32573
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
BacklogNo due datehttps://github.com/microsoft/TypeScript/milestone/29
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.