René's URL Explorer Experiment


Title: Stack overflow while type checking generic, mutually-defined function interfaces · Issue #18277 · microsoft/TypeScript · GitHub

Open Graph Title: Stack overflow while type checking generic, mutually-defined function interfaces · Issue #18277 · microsoft/TypeScript

X Title: Stack overflow while type checking generic, mutually-defined function interfaces · Issue #18277 · microsoft/TypeScript

Description: TypeScript Version: 2.4.0 onwards Code export interface Foo { (bar: Bar): void; } export interface Bar { (foo: Foo): Foo; } function createBar(): Bar { return (f) => f; } function foo( bar: Bar, ): void {} // S...

Open Graph Description: TypeScript Version: 2.4.0 onwards Code export interface Foo { (bar: Bar): void; } export interface Bar { (foo: Foo): Foo; } function createBar(): Bar { return (f) => f; } funct...

X Description: TypeScript Version: 2.4.0 onwards Code export interface Foo<T> { (bar: Bar<T>): void; } export interface Bar<T> { (foo: Foo<T>): Foo<T>; } function createBar<T>(...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stack overflow while type checking generic, mutually-defined function interfaces","articleBody":"\u003c!-- BUGS: Please use this template. -->\r\n\u003c!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript -->\r\n\u003c!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md -->\r\n\r\n**TypeScript Version:**  `2.4.0` onwards\r\n\r\n**Code**\r\n```ts\r\nexport interface Foo\u003cT> {\r\n  (bar: Bar\u003cT>): void;\r\n}\r\n\r\nexport interface Bar\u003cT> {\r\n  (foo: Foo\u003cT>): Foo\u003cT>;\r\n}\r\n\r\nfunction createBar\u003cT>(): Bar\u003cT> {\r\n  return (f) => f;\r\n}\r\n\r\nfunction foo\u003cT>(\r\n  bar: Bar\u003cT>,\r\n): void {}\r\n\r\n// Stack overflow\r\ncreateBar()(foo) === foo;\r\n```\r\nSimplified down from a real code-base.\r\n\r\n**Expected behavior:**\r\n\r\nCompiles fine, as per \u003c `2.3.4`\r\n\r\n**Actual behavior:**\r\n\r\nWith `2.4.0` (same behaviour with `2.5.2`):\r\n\r\n```shell\r\n$ ./node_modules/.bin/tsc example.ts\r\n./node_modules/typescript/lib/tsc.js:55708\r\n                throw e;\r\n                ^\r\n\r\nRangeError: Maximum call stack size exceeded\r\n    at getErasedSignature (.../node_modules/typescript/lib/tsc.js:27019:36)\r\n    at compareSignaturesRelated (.../node_modules/typescript/lib/tsc.js:28517:22)\r\n    at compareSignaturesRelated (.../node_modules/typescript/lib/tsc.js:28548:21)\r\n    at compareSignaturesRelated (.../node_modules/typescript/lib/tsc.js:28548:21)\r\n    at compareSignaturesRelated (.../node_modules/typescript/lib/tsc.js:28548:21)\r\n    at compareSignaturesRelated (.../node_modules/typescript/lib/tsc.js:28548:21)\r\n    at compareSignaturesRelated (.../node_modules/typescript/lib/tsc.js:28548:21)\r\n    at compareSignaturesRelated (.../node_modules/typescript/lib/tsc.js:28548:21)\r\n    at compareSignaturesRelated (.../node_modules/typescript/lib/tsc.js:28548:21)\r\n    at compareSignaturesRelated (.../node_modules/typescript/lib/tsc.js:28548:21)\r\n```","author":{"url":"https://github.com/willfrew","@type":"Person","name":"willfrew"},"datePublished":"2017-09-06T16:23:49Z","url":"https://github.com/microsoft/TypeScript/issues/18277"}

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:e4e140ef-d0d2-e255-9c6a-d1a581629f5c
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE802:2564D8:E272F6:12C4332:6B00FEEA
html-safe-nonce561fdc365bacee65e7f1dc80d7c393f2110dd2ca84090d124128094111df4bee
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODAyOjI1NjREODpFMjcyRjY6MTJDNDMzMjo2QjAwRkVFQSIsInZpc2l0b3JfaWQiOiIxMTEwMjg3MDQ5NjgxODYyMzc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb0673b9e55da51300d6c9d88f459640f53d6dfd70af5ce8f050ef2b98e637c40
hovercard-subject-tagissue:255664724
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/18277/issue_layout
twitter:imagehttps://opengraph.githubassets.com/ebcc295f6c1b11f89458e93a6e2e05e37262db1b103c698effe89eadf542cc92/microsoft/TypeScript/issues/18277
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ebcc295f6c1b11f89458e93a6e2e05e37262db1b103c698effe89eadf542cc92/microsoft/TypeScript/issues/18277
og:image:altTypeScript Version: 2.4.0 onwards Code export interface Foo { (bar: Bar): void; } export interface Bar { (foo: Foo): Foo; } function createBar(): Bar { return (f) => f; } funct...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamewillfrew
hostnamegithub.com
expected-hostnamegithub.com
Nonecb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124
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
release2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/18277#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F18277
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%2F18277
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/18277
Reloadhttps://github.com/microsoft/TypeScript/issues/18277
Reloadhttps://github.com/microsoft/TypeScript/issues/18277
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests309 (309)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/18277
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/18277
#19107https://github.com/microsoft/TypeScript/pull/19107
Stack overflow while type checking generic, mutually-defined function interfaceshttps://github.com/microsoft/TypeScript/issues/18277#top
#19107https://github.com/microsoft/TypeScript/pull/19107
https://github.com/ahejlsberg
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
TypeScript 2.6.1https://github.com/microsoft/TypeScript/milestone/57
https://github.com/willfrew
Will Frew (willfrew)https://github.com/willfrew
on Sep 6, 2017https://github.com/microsoft/TypeScript/issues/18277#issue-255664724
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
on Sep 6, 2017https://github.com/microsoft/TypeScript/issues/18277#event-1237439397
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Sep 6, 2017https://github.com/microsoft/TypeScript/issues/18277#event-1237439470
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.6https://github.com/microsoft/TypeScript/milestone/53
on Sep 6, 2017https://github.com/microsoft/TypeScript/issues/18277#event-1237439867
Mohamed Hegazy (mhegazy)https://github.com/mhegazy
TypeScript 2.6https://github.com/microsoft/TypeScript/milestone/53
TypeScript 2.6.1https://github.com/microsoft/TypeScript/milestone/57
on Oct 10, 2017https://github.com/microsoft/TypeScript/issues/18277#event-1286496804
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Oct 10, 2017https://github.com/microsoft/TypeScript/issues/18277#event-1286933625
Track recursive calls to compareSignaturesRelatedhttps://github.com/microsoft/TypeScript/commit/b0a64446d18d1d901432a52d1177328bc19fe66e
https://docs.github.com/articles/closing-issues-via-commit-messages
b0a6444https://github.com/microsoft/TypeScript/commit/b0a64446d18d1d901432a52d1177328bc19fe66e
Test fix #18277:mutually recursive callbackshttps://github.com/microsoft/TypeScript/commit/d93542253fcfa27a4da1ba3a2d625bbd3dd0cab1
#18277https://github.com/microsoft/TypeScript/issues/18277
https://docs.github.com/articles/closing-issues-via-commit-messages
d935422https://github.com/microsoft/TypeScript/commit/d93542253fcfa27a4da1ba3a2d625bbd3dd0cab1
https://github.com/sandersn
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Oct 10, 2017https://github.com/microsoft/TypeScript/issues/18277#issuecomment-335606628
#19078https://github.com/microsoft/TypeScript/pull/19078
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
on Oct 10, 2017https://github.com/microsoft/TypeScript/issues/18277#event-1286937635
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
Nathan Shively-Sanders (sandersn)https://github.com/sandersn
on Oct 11, 2017https://github.com/microsoft/TypeScript/issues/18277#event-1288867852
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#19107https://github.com/microsoft/TypeScript/pull/19107
on Oct 11, 2017https://github.com/microsoft/TypeScript/issues/18277#event-1289253590
microsofthttps://github.com/microsoft
on Jun 14, 2018https://github.com/microsoft/TypeScript/issues/18277#event-1682130290
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/18277
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/18277
Anders Hejlsberg (ahejlsberg)https://github.com/ahejlsberg
BugA bug in TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Bug%22
FixedA PR has been merged for this issuehttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Fixed%22
TypeScript 2.6.1https://github.com/microsoft/TypeScript/milestone/57
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.