Title: Suboptimal completion list for template literal type member · Issue #59698 · microsoft/TypeScript · GitHub
Open Graph Title: Suboptimal completion list for template literal type member · Issue #59698 · microsoft/TypeScript
X Title: Suboptimal completion list for template literal type member · Issue #59698 · microsoft/TypeScript
Description: 🔎 Search Terms "completion list", "template literal", "prefix", "unexpected items" 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entries. ⏯ Playground Link https://www.typesc...
Open Graph Description: 🔎 Search Terms "completion list", "template literal", "prefix", "unexpected items" 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entri...
X Description: 🔎 Search Terms "completion list", "template literal", "prefix", "unexpected items" 🕗 Version & Regression Information This is the behavior in every versi...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/59698
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Suboptimal completion list for template literal type member","articleBody":"### 🔎 Search Terms\r\n\r\n\"completion list\", \"template literal\", \"prefix\", \"unexpected items\"\r\n\r\n### 🕗 Version & Regression Information\r\n\r\n- This is the behavior in every version I tried, and I reviewed the FAQ for entries.\r\n\r\n### ⏯ Playground Link\r\n\r\nhttps://www.typescriptlang.org/play/?ts=5.7.0-dev.20240820#code/C4TwDgpgBAKlC8UAGASA3gIjAJwgMwEsAPARgwB8tdCiAmDAX3QGdhsCA7AcwaQG4AUAIA2EYFCIAuWAigYMQA\r\n\r\n### 💻 Code\r\n\r\n```ts\r\ntype T = `${\"prefix1\"|\"prefix2\"}${string}`;\r\n\r\nlet x: T = \"\"\r\n```\r\n\r\n\r\n### 🙁 Actual behavior\r\n\r\nWhen requesting a completion inside the `\"\"`, I get `\"$\"`, `\"let\"`, `\"prefix1\"`, `\"prefix2\"`, `\"string\"`, `\"T\"`, `\"type\"`, `\"x\"`.\r\n\r\n### 🙂 Expected behavior\r\n\r\nI expect to get just `\"prefix1\"`, `\"prefix2\"`.\r\n\r\n### Additional information about the issue\r\n\r\nThe current completions include strings that the value cannot legally start with.","author":{"url":"https://github.com/MichalMarsalek","@type":"Person","name":"MichalMarsalek"},"datePublished":"2024-08-20T08:58:25Z","url":"https://github.com/microsoft/TypeScript/issues/59698"}
| 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:7b627b01-5235-3914-da5a-8b091ddfb2b2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 83F6:16EED3:21CFB12:2B0240B:6B017BB3 |
| html-safe-nonce | 7faaeb48a469b89773f2930ed6e9082a8987317d1db6c17fa63afeca4c0313b6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4M0Y2OjE2RUVEMzoyMUNGQjEyOjJCMDI0MEI6NkIwMTdCQjMiLCJ2aXNpdG9yX2lkIjoiNTE4ODE2MzMwODE1MDE2MDMwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c9c54edd5d0ffdf91b46bbc1e355e2506bcde0f977e5b6fae70648cf98bd8259 |
| hovercard-subject-tag | issue:2475093942 |
| 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/59698/issue_layout |
| twitter:image | https://opengraph.githubassets.com/607fbec78c1903789a073593f2949e65e7c86e4feb7c6e4f4ca5ee514f74d439/microsoft/TypeScript/issues/59698 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/607fbec78c1903789a073593f2949e65e7c86e4feb7c6e4f4ca5ee514f74d439/microsoft/TypeScript/issues/59698 |
| og:image:alt | 🔎 Search Terms "completion list", "template literal", "prefix", "unexpected items" 🕗 Version & Regression Information This is the behavior in every version I tried, and I reviewed the FAQ for entri... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MichalMarsalek |
| 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