Title: Maximum call stack when using `typeof` own namespace · Issue #6072 · microsoft/TypeScript · GitHub
Open Graph Title: Maximum call stack when using `typeof` own namespace · Issue #6072 · microsoft/TypeScript
X Title: Maximum call stack when using `typeof` own namespace · Issue #6072 · microsoft/TypeScript
Description: Minimal test should reproduce it (it did in the playground, confirmed it was not working with typescript@next locally): class Foo {} function maker (value: string): typeof maker.Bar {} namespace maker { class Bar extends Foo {} } The sta...
Open Graph Description: Minimal test should reproduce it (it did in the playground, confirmed it was not working with typescript@next locally): class Foo {} function maker (value: string): typeof maker.Bar {} namespace ma...
X Description: Minimal test should reproduce it (it did in the playground, confirmed it was not working with typescript@next locally): class Foo {} function maker (value: string): typeof maker.Bar {} namespace ma...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/6072
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Maximum call stack when using `typeof` own namespace","articleBody":"Minimal test should reproduce it (it did in the playground, confirmed it was not working with `typescript@next` locally):\n\n``` js\nclass Foo {}\n\nfunction maker (value: string): typeof maker.Bar {}\n\nnamespace maker {\n class Bar extends Foo {}\n}\n```\n\nThe stack trace locally:\n\n```\n/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:31991\n throw e;\n ^\n\nRangeError: Maximum call stack size exceeded\n at checkPropertyAccessExpressionOrQualifiedName (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:17864:62)\n at checkQualifiedName (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:17862:20)\n at checkExpression (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:19502:24)\n at getTypeFromTypeQueryNode (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14618:53)\n at getTypeFromTypeNode (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14907:28)\n at getSignatureFromDeclaration (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14332:34)\n at getSignaturesOfSymbol (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14373:37)\n at resolveAnonymousTypeMembers (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14029:38)\n at resolveStructuredTypeMembers (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14057:21)\n at getPropertyOfType (/Users/blakeembrey/Projects/blakeembrey/make-error-cause/node_modules/typescript/lib/tsc.js:14189:32)\n```\n\nFeel free to let me know if I'm trying to do something wrong, but it probably shouldn't crash anyway.\n\nEdit: For additional information, it come from trying to type `make-error` (https://raw.githubusercontent.com/typings/typed-make-error/5a653400e91cf7046512544b7ed2ebab702b0183/index.d.ts). I noticed I had a bug when not using `typeof`, and that caused it to crash.\n","author":{"url":"https://github.com/blakeembrey","@type":"Person","name":"blakeembrey"},"datePublished":"2015-12-11T23:31:02Z","url":"https://github.com/microsoft/TypeScript/issues/6072"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c3ab1555-cddb-965a-211c-c2ed448d77a9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B1B6:A20F9:155E181:1C55AAF:6B012B99 |
| html-safe-nonce | 76a60e4cd20cfd6164dfd9054099215a4a7bdf109e893fd87aa8ef314224d11a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUI2OkEyMEY5OjE1NUUxODE6MUM1NUFBRjo2QjAxMkI5OSIsInZpc2l0b3JfaWQiOiIxOTE3MTE3OTk3OTI3OTY3NjQyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 959e585f21ff4221e52e7ef5d3d847bebebe6d8997ef56123d21d6a134b13372 |
| hovercard-subject-tag | issue:121812405 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/6072/issue_layout |
| twitter:image | https://opengraph.githubassets.com/84ebbf6ce7ff2864d39d3e44c81df304201151ff8c2b70d5757160f326292b2c/microsoft/TypeScript/issues/6072 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/84ebbf6ce7ff2864d39d3e44c81df304201151ff8c2b70d5757160f326292b2c/microsoft/TypeScript/issues/6072 |
| og:image:alt | Minimal test should reproduce it (it did in the playground, confirmed it was not working with typescript@next locally): class Foo {} function maker (value: string): typeof maker.Bar {} namespace ma... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | blakeembrey |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git |
| octolytics-dimension-user_id | 6154722 |
| octolytics-dimension-user_login | microsoft |
| octolytics-dimension-repository_id | 20929025 |
| octolytics-dimension-repository_nwo | microsoft/TypeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 20929025 |
| octolytics-dimension-repository_network_root_nwo | microsoft/TypeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width