Title: Debug Failure. No error for last overload signature · Issue #48636 · microsoft/TypeScript · GitHub
Open Graph Title: Debug Failure. No error for last overload signature · Issue #48636 · microsoft/TypeScript
X Title: Debug Failure. No error for last overload signature · Issue #48636 · microsoft/TypeScript
Description: Bug Report 🔎 Search Terms "Debug Failure. No error for last overload signature" Also, for anyone in the future finding a minimal reproduction for an error like this: edit node_modules/typescript/tsc.js in order to find out which line is ...
Open Graph Description: Bug Report 🔎 Search Terms "Debug Failure. No error for last overload signature" Also, for anyone in the future finding a minimal reproduction for an error like this: edit node_modules/typescript/ts...
X Description: Bug Report 🔎 Search Terms "Debug Failure. No error for last overload signature" Also, for anyone in the future finding a minimal reproduction for an error like this: edit node_modules/typ...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/48636
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Debug Failure. No error for last overload signature","articleBody":"# Bug Report\r\n\r\n\u003c!--\r\n Please fill in each section completely. Thank you!\r\n--\u003e\r\n\r\n### 🔎 Search Terms\r\n\r\n\u003c!--\r\n What search terms did you use when trying to find an existing bug report?\r\n List them here so people in the future can find this one more easily.\r\n--\u003e\r\n\r\n\"Debug Failure. No error for last overload signature\"\r\n\r\nAlso, for anyone in the future finding a minimal reproduction for an error like this: edit `node_modules/typescript/tsc.js` in order to find out which line is causing the crash\r\n\r\n```diff\r\n- ts.Debug.fail(\"No error for last overload signature\");\r\n+ ts.Debug.fail(\"No error for last overload signature. Call:\\n\" + ts.getTextOfNode(node));\r\n```\r\n\r\n### 🕗 Version \u0026 Regression Information\r\n\r\n\u003c!-- When did you start seeing this bug occur?\r\n\r\n\"Bugs\" that have existed in TS for a long time are very likely to be FAQs; refer to\r\n https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs\r\n\r\nIf possible, please try testing the nightly version of TS to see if it's already been fixed.\r\nFor npm: `typescript@next`\r\nThis is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly\r\n\r\nNote: The TypeScript Playground can be used to try older versions of TypeScript.\r\n\r\nPlease keep and fill in the line that best applies:\r\n--\u003e\r\n\r\n- This is a crash\r\n\r\n### ⏯ Playground Link\r\n\r\n\u003c!--\r\n A link to a TypeScript Playground \"Share\" link which shows this behavior\r\n\r\n The TypeScript Workbench can be used for more complex setups, try\r\n https://www.typescriptlang.org/dev/bug-workbench/\r\n\r\n As a last resort, you can link to a repo, but these will be slower for us to investigate.\r\n--\u003e\r\n[Workbench link with relevant code](https://www.typescriptlang.org/dev/bug-workbench/?#code/C4TwDgpgBAIhFgEoQIYBMD2A7ANiAPACoB8UAvFAAxQQAewEWaAzlAIxQBkUhUA-DygAuKAG8AUFClQATqky4QUANoBpKAEssUANYQQGAGY8AuiLgJk6bHiJqTxANziAvs7QQAxjhRyohgFcsT2ANbFkvbE8NHAgiGnpGFigAVQAaVOIACgA3FBwAiBFCAEoRLOZgFAYRFJLyUkJncVBIKABlYAw5dohgBhkiUgosrLA5HM7qoth4JHkbAhJ6slILeetFIZLm1uhe4E7uiAAxIJCwrCHyKAq+gZEjnvuIQeWGqByMDTRmujBusB-OdQuE9sxPDINGBgABhGQoZgACyGWUk0jyBRm6ysClsJDS6KkzD6ADV8oVHn0nqcQZd4gAfKBYAI4HDEQn1CTSKAk4DkrFZOSeKIxCC5CkQEo7VxAA)\r\n\r\n### 💻 Code\r\n\r\n\u003c!-- Please post the relevant code sample here as well--\u003e\r\n```ts\r\ntype DeepReadonly\u003cT\u003e = 0 extends 1 \u0026 T ? T : {\r\n readonly [K in keyof T]: DeepReadonly\u003cT[K]\u003e;\r\n};\r\ndeclare function reconcile\u003cT extends U, U\u003e(value: T): (state: U) =\u003e T;\r\n\r\ntype StoreSetter\u003cT\u003e = ((prevState: DeepReadonly\u003cT\u003e) =\u003e DeepReadonly\u003cT\u003e);\r\n\r\ntype SetStoreFunction\u003cT\u003e = (setter: StoreSetter\u003cT\u003e) =\u003e void;\r\n\r\nexport function typescriptCrash\u003cT\u003e(\r\n value: DeepReadonly\u003cT\u003e,\r\n setValue: SetStoreFunction\u003cT | null\u003e,\r\n) {\r\n setValue(reconcile(value));\r\n}\r\n```\r\n\r\n### 🙁 Actual behavior\r\n\r\n\u003c!-- What happened, and why it was wrong --\u003e\r\n\r\nTypescript crashed.\r\n\r\n```\r\nDebug Failure. No error for last overload signature\r\n\r\nfail@https://typescript.azureedge.net/cdn/4.7.0-dev.20220408/monaco/dev/vs/language/typescript/tsWorker.js:2468:17\r\nresolveCall@https://typescript.azureedge.net/cdn/4.7.0-dev.20220408/monaco/dev/vs/language/typescript/tsWorker.js:62458:27\r\nresolveCallExpression@https://typescript.azureedge.net/cdn/4.7.0-dev.20220408/monaco/dev/vs/language/typescript/tsWorker.js:62780:16\r\nresolveSignature@https://typescript.azureedge.net/cdn/4.7.0-dev.20220408/monaco/dev/vs/language/typescript/tsWorker.js:63097:20\r\n…\r\n```\r\n\r\n### 🙂 Expected behavior\r\n\r\n\u003c!-- What you expected to happen instead, and why --\u003e\r\n\r\nTypescript should not have crashed. Also, I think the code should compile with no errors, but I'm not sure.\r\n","author":{"url":"https://github.com/pfgithub","@type":"Person","name":"pfgithub"},"datePublished":"2022-04-10T18:42:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/48636/TypeScript/issues/48636"}
| 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:e1f0576c-5573-f2fb-668d-5b11a8f1611b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9638:262DEA:1AAC56:275274:6A61D675 |
| html-safe-nonce | 3881d39cd90d478724d17e2cd7ceab01abd335527b0a7c805cff9c80b6601100 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjM4OjI2MkRFQToxQUFDNTY6Mjc1Mjc0OjZBNjFENjc1IiwidmlzaXRvcl9pZCI6IjgzMjkzMjIyMTAyNjEwNjMyODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d226566061896a9cff41594196bec3d3a5cf80142d03e7bdf54af610763d1150 |
| hovercard-subject-tag | issue:1199138242 |
| 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/48636/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bb3441e5c6c0327b7f76b84c7909531495750d06e50e504a54d4636a8de0c756/microsoft/TypeScript/issues/48636 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bb3441e5c6c0327b7f76b84c7909531495750d06e50e504a54d4636a8de0c756/microsoft/TypeScript/issues/48636 |
| og:image:alt | Bug Report 🔎 Search Terms "Debug Failure. No error for last overload signature" Also, for anyone in the future finding a minimal reproduction for an error like this: edit node_modules/typescript/ts... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pfgithub |
| hostname | github.com |
| expected-hostname | github.com |
| None | b2de8c74e5e61e893155ba46ee41bc66170c1644cb795adefa8386d490f7781c |
| 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 | d1866027ded575df8a15c731dd8b9986c9483ceb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width