Title: Incorrect completions in object literal expression for overloads · Issue #52692 · microsoft/TypeScript · GitHub
Open Graph Title: Incorrect completions in object literal expression for overloads · Issue #52692 · microsoft/TypeScript
X Title: Incorrect completions in object literal expression for overloads · Issue #52692 · microsoft/TypeScript
Description: Bug Report 🔎 Search Terms 🕗 Version & Regression Information ⏯ Playground Link ts play code Code to test Simplified from got typings. interface T {
Open Graph Description: Bug Report 🔎 Search Terms 🕗 Version & Regression Information ⏯ Playground Link ts play code Code to test Simplified from got typings. interface T {
X Description: Bug Report 🔎 Search Terms 🕗 Version & Regression Information ⏯ Playground Link ts play code Code to test Simplified from got typings. interface T { <T>(input: { type: 'text' }) &l...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/52692
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Incorrect completions in object literal expression for overloads","articleBody":"# Bug Report\r\n\r\n\u003c!--\r\n Please fill in each section completely. Thank you!\r\n-->\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-->\r\n\r\n### 🕗 Version & Regression Information\r\n\r\n\r\n### ⏯ Playground Link\r\n\r\n[ts play code](https://www.typescriptlang.org/play?noImplicitAny=false&ts=5.0.0-dev.20230208#code/JYOwLgpgTgZghgYwgAgCrIN4FgBQz-IAUoADgK5gBcmyYAniRNQOSQAeYzyAvgJS4FkAHlQA+YiHJUa9RiwBWAZwD2ILn2qoBBCVOoZaDJsmYAjMjBjR1-HN1yhIsRClQAmTNvy6KLdp1tBEXFSXxMlVWZeTS8iUOkzCysoKNx7HFwAEwgEABs4KBQEVUUwZBgyEAQYnGy8gqKSsoqqt003XFwWhEIDWWNmGy7KhDdCQdsgA)\r\n\r\n### Code to test\r\n\r\nSimplified from `got` typings.\r\n\r\n```ts\r\ninterface T {\r\n \u003cT>(input: { type: 'text' })\r\n \u003cT>(input: { type: 'json' })\r\n \u003cT>(input: { type: 'buffer' })\r\n}\r\n\r\ndeclare const func: T\r\n\r\nfunc({ type: /**/ })\r\n```\r\n\r\nNo **all** literal or in-string completions, but okay if remove `\u003cT>` from each overload.\r\n\r\n### 🙁 Actual behavior\r\n\r\nCompletions in `func({ type: '|' })` (text) missing completions from `func2('|')` (text, json, buffer)\r\n\r\n### 🙂 Expected behavior\r\n\r\nCompletions for `func({ type: '|' })` are the same as for `func2('|')`\r\n\r\nI'm not sure probably its related to https://github.com/microsoft/TypeScript/issues/51047 (or duplicate)","author":{"url":"https://github.com/zardoy","@type":"Person","name":"zardoy"},"datePublished":"2023-02-09T00:45:01Z","url":"https://github.com/microsoft/TypeScript/issues/52692"}
| 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:b0105fd4-268e-e93b-f8eb-0400557ff85d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 90DE:37FB02:AAD77:E2F3E:6B01595E |
| html-safe-nonce | 253fc589748c425b637501dd5a7c2104865007ba8e0cebb1c6a24f1dbe086e7b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MERFOjM3RkIwMjpBQUQ3NzpFMkYzRTo2QjAxNTk1RSIsInZpc2l0b3JfaWQiOiIzNTI2MDU4MTczODU2MDU0NzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d0947c67522da2f05e697a5784fd3e901947abb9e26f1785b962568df9444866 |
| hovercard-subject-tag | issue:1577025205 |
| 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/52692/issue_layout |
| twitter:image | https://opengraph.githubassets.com/057d5185aa63b12d3a9ce5298aa0e2387dc6ca6e6dc62f2d90d1c4ed569a9426/microsoft/TypeScript/issues/52692 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/057d5185aa63b12d3a9ce5298aa0e2387dc6ca6e6dc62f2d90d1c4ed569a9426/microsoft/TypeScript/issues/52692 |
| og:image:alt | Bug Report 🔎 Search Terms 🕗 Version & Regression Information ⏯ Playground Link ts play code Code to test Simplified from got typings. interface T { |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zardoy |
| 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