Title: Assert in inferFromUsages when typing function with rest args · Issue #20520 · microsoft/TypeScript · GitHub
Open Graph Title: Assert in inferFromUsages when typing function with rest args · Issue #20520 · microsoft/TypeScript
X Title: Assert in inferFromUsages when typing function with rest args · Issue #20520 · microsoft/TypeScript
Description: Code: function f(... Trace: Exception on executing command {"seq":403,"type":"request","command":"getCodeFixes","arguments":{"file":"c:/Throwaway/a.ts","startLine":1,"startOffset":12,"endLine":1,"endOffset":15,"errorCodes":[7019,1003]}}:...
Open Graph Description: Code: function f(... Trace: Exception on executing command {"seq":403,"type":"request","command":"getCodeFixes","arguments":{"file":"c:/Throwaway/a.ts","startLine":1,"startOffset":12,"endLine":1,"e...
X Description: Code: function f(... Trace: Exception on executing command {"seq":403,"type":"request","command":"getCodeFixes","arguments":{"file&q...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/20520
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Assert in inferFromUsages when typing function with rest args","articleBody":"Code:\r\n```\r\nfunction f(...\r\n```\r\n\r\nTrace:\r\n```\r\nException on executing command {\"seq\":403,\"type\":\"request\",\"command\":\"getCodeFixes\",\"arguments\":{\"file\":\"c:/Throwaway/a.ts\",\"startLine\":1,\"startOffset\":12,\"endLine\":1,\"endOffset\":15,\"errorCodes\":[7019,1003]}}:\r\n\r\n Debug Failure. False expression: Found no references!\r\n\r\n Error: Debug Failure. False expression: Found no references!\r\n at getReferences (C:\\github\\TypeScript\\built\\local\\tsserver.js:92872:26)\r\n at inferTypeForVariableFromUsage (C:\\github\\TypeScript\\built\\local\\tsserver.js:92877:67)\r\n at C:\\github\\TypeScript\\built\\local\\tsserver.js:92812:108\r\n at Object.map (C:\\github\\TypeScript\\built\\local\\tsserver.js:1710:29)\r\n at getCodeActionForParameters (C:\\github\\TypeScript\\built\\local\\tsserver.js:92812:24)\r\n at Object.getActionsForAddExplicitTypeAnnotation [as getCodeActions] (C:\\github\\TypeScript\\built\\local\\tsserver.js:92771:28)\r\n at C:\\github\\TypeScript\\built\\local\\tsserver.js:90978:33\r\n at Object.forEach (C:\\github\\TypeScript\\built\\local\\tsserver.js:1511:30)\r\n at Object.getFixes (C:\\github\\TypeScript\\built\\local\\tsserver.js:90977:16)\r\n at C:\\github\\TypeScript\\built\\local\\tsserver.js:96798:35\r\n at Object.flatMap (C:\\github\\TypeScript\\built\\local\\tsserver.js:1771:25)\r\n at Object.getCodeFixesAtPosition (C:\\github\\TypeScript\\built\\local\\tsserver.js:96796:23)\r\n at IOSession.Session.getCodeFixes (C:\\github\\TypeScript\\built\\local\\tsserver.js:104325:64)\r\n at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (C:\\github\\TypeScript\\built\\local\\tsserver.js:103203:61)\r\n at C:\\github\\TypeScript\\built\\local\\tsserver.js:104488:88\r\n at IOSession.Session.executeWithRequestId (C:\\github\\TypeScript\\built\\local\\tsserver.js:104479:28)\r\n at IOSession.Session.executeCommand (C:\\github\\TypeScript\\built\\local\\tsserver.js:104488:33)\r\n at IOSession.Session.onMessage (C:\\github\\TypeScript\\built\\local\\tsserver.js:104508:35)\r\n at Interface.\u003canonymous> (C:\\github\\TypeScript\\built\\local\\tsserver.js:105760:27)\r\n at emitOne (events.js:96:13)\r\n at Interface.emit (events.js:191:7)\r\n at Interface._onLine (readline.js:241:10)\r\n at Interface._normalWrite (readline.js:384:12)\r\n at Socket.ondata (readline.js:101:10)\r\n```","author":{"url":"https://github.com/RyanCavanaugh","@type":"Person","name":"RyanCavanaugh"},"datePublished":"2017-12-06T22:36:06Z","url":"https://github.com/microsoft/TypeScript/issues/20520"}
| 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:6de0bf55-6143-ad25-245e-dec6d6a525b5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A890:172B92:2995DDB:376DA0A:6B01BCF4 |
| html-safe-nonce | 7a68e67465ce7b01b3d7c8f9aa4cc11a890117996ee1337661bd285f420ece31 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODkwOjE3MkI5MjoyOTk1RERCOjM3NkRBMEE6NkIwMUJDRjQiLCJ2aXNpdG9yX2lkIjoiODczNTEyNDM0NDAzMzg4NTQyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 470b28c350db9df2eee1244fad489033a5b581b193bf4284d6ceeae776de4d6a |
| hovercard-subject-tag | issue:279932227 |
| 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/20520/issue_layout |
| twitter:image | https://opengraph.githubassets.com/569f664b97733112e2708bdc13075c9fa8476ea9378d34e2df0a7ac560b6aa28/microsoft/TypeScript/issues/20520 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/569f664b97733112e2708bdc13075c9fa8476ea9378d34e2df0a7ac560b6aa28/microsoft/TypeScript/issues/20520 |
| og:image:alt | Code: function f(... Trace: Exception on executing command {"seq":403,"type":"request","command":"getCodeFixes","arguments":{"file":"c:/Throwaway/a.ts","startLine":1,"startOffset":12,"endLine":1,"e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | RyanCavanaugh |
| 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