Title: [ts-5.5] Private aliases expanded in index and keyof types - 5.5 regression · Issue #58713 · microsoft/TypeScript · GitHub
Open Graph Title: [ts-5.5] Private aliases expanded in index and keyof types - 5.5 regression · Issue #58713 · microsoft/TypeScript
X Title: [ts-5.5] Private aliases expanded in index and keyof types - 5.5 regression · Issue #58713 · microsoft/TypeScript
Description: 🔎 Search Terms type alias inlined regression 5.5 🕗 Version & Regression Information This changed between versions 5.5.0-dev.20240514 and 5.5.0-dev.20240515 ⏯ Playground Link Workbench 💻 Code // @declaration: true // @filename: a.ts type ...
Open Graph Description: 🔎 Search Terms type alias inlined regression 5.5 🕗 Version & Regression Information This changed between versions 5.5.0-dev.20240514 and 5.5.0-dev.20240515 ⏯ Playground Link Workbench 💻 Code // @de...
X Description: 🔎 Search Terms type alias inlined regression 5.5 🕗 Version & Regression Information This changed between versions 5.5.0-dev.20240514 and 5.5.0-dev.20240515 ⏯ Playground Link Workbench 💻 Code //...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/58713
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[ts-5.5] Private aliases expanded in index and keyof types - 5.5 regression ","articleBody":"### 🔎 Search Terms\n\ntype alias inlined regression 5.5\n\n### 🕗 Version \u0026 Regression Information\n\n- This changed between versions 5.5.0-dev.20240514 and 5.5.0-dev.20240515\n\n### ⏯ Playground Link\n\n[Workbench](https://www.typescriptlang.org/dev/bug-workbench/?ts=5.5.0-dev.20240515#code/PTAEAEBMFMGMBsCGAnRAXAlgewHYC5Q1kBXaAKDJAgDMN5odEBbaAxAOjQGcy0BPAA7RQAeVABeUAG8yoOaAHIsAglyIYcAc1nzFygEyr1WsgF8K-IaACSE6Trl6VoNcg3bzZaAA8BWZGigsLhqoNQ4dgAUAG4EIgDaAOROiQC6ADSgWHFMGGgAPCKZANbQfFjUNgB8AJQSVdKmANwUVOC09IwsBABGnDxkGEx+AdLhpmFKTKCJ7MCIiV6+-oHBOKGVkuFNQA)\n\n### 💻 Code\n\n```ts\r\n// @declaration: true\r\n\r\n// @filename: a.ts\r\ntype O = {\r\n prop: string\r\n prop2: string\r\n}\r\n\r\ntype I = {\r\n prop: string\r\n}\r\n\r\nexport const fn = (v: O['prop'], o: Omit\u003cO, keyof I\u003e) =\u003e {};\r\n\r\n// @filename: b.ts\r\n\r\nimport {fn} from './a'\r\nexport const f = fn;\r\n```\r\n\n\n### 🙁 Actual behavior\n\n`O['prop']` is written in declaration file as `{ prop: string; prop2: string; }[prop\"]`. And `Omit\u003cO, keyof I\u003e` is printed as `Omit\u003c{\r\n prop: string;\r\n prop2: string;\r\n}, keyof {\r\n prop: string;\r\n}\u003e` \r\n\r\nThis is problematic especially if the type is a bigger as it balloon the size of the printed type and it may pull in references that were not previously used (causing new errors)\n\n### 🙂 Expected behavior\n\n`O['prop']` is written in declaration file as `string` as `O` and `Omit\u003cO, keyof I\u003e` is printed as `Omit\u003cO, 'prop'\u003e` as in 5.4 since `O` and `I` can't be named\n\n### Additional information about the issue\n\n_No response_","author":{"url":"https://github.com/dragomirtitian","@type":"Person","name":"dragomirtitian"},"datePublished":"2024-05-30T15:36:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/58713/TypeScript/issues/58713"}
| 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:7648da46-9850-e4fb-c2e1-4179b4d33166 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 801E:29BE21:72BBD6:9D9947:6A61B545 |
| html-safe-nonce | ef0b0e54c2976901b14cf66fcaf5930db949181bfe5262c9efb04baea0976e5c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDFFOjI5QkUyMTo3MkJCRDY6OUQ5OTQ3OjZBNjFCNTQ1IiwidmlzaXRvcl9pZCI6IjM3NjA2NDUxNjExMTIxNTU0NjEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 684adaf941f3aeee0b756e2b8192ebdcd564186a27dee6b932d4d3ec1cf679bf |
| hovercard-subject-tag | issue:2325982439 |
| 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/58713/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2e9543f13c6e82edacf7a9be84c026082c35aa67e3d842c9fcb6b21b2f9e43aa/microsoft/TypeScript/issues/58713 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2e9543f13c6e82edacf7a9be84c026082c35aa67e3d842c9fcb6b21b2f9e43aa/microsoft/TypeScript/issues/58713 |
| og:image:alt | 🔎 Search Terms type alias inlined regression 5.5 🕗 Version & Regression Information This changed between versions 5.5.0-dev.20240514 and 5.5.0-dev.20240515 ⏯ Playground Link Workbench 💻 Code // @de... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dragomirtitian |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6f4633bcf01c1ad14b73fd07dd39ac31d61f3d3c2578ee08ec1792b7b351eeb9 |
| 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 | ac296ae7f21856f1f92adbad22f870b6fbb4b907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width