Title: "Inferred type cannot be named" error caused by adding `paths` to tsconfig · Issue #57802 · microsoft/TypeScript · GitHub
Open Graph Title: "Inferred type cannot be named" error caused by adding `paths` to tsconfig · Issue #57802 · microsoft/TypeScript
X Title: "Inferred type cannot be named" error caused by adding `paths` to tsconfig · Issue #57802 · microsoft/TypeScript
Description: 🔎 Search Terms "inferred type cannot be named", "paths" 🕗 Version & Regression Information This changed in PR #55015 ⏯ Playground Link https://github.com/haines/typescript-paths-inferred-type-cannot-be-named 💻 Code Please see the linked ...
Open Graph Description: 🔎 Search Terms "inferred type cannot be named", "paths" 🕗 Version & Regression Information This changed in PR #55015 ⏯ Playground Link https://github.com/haines/typescript-paths-inferred-type-canno...
X Description: 🔎 Search Terms "inferred type cannot be named", "paths" 🕗 Version & Regression Information This changed in PR #55015 ⏯ Playground Link https://github.com/haines/typescript-p...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/57802
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"\"Inferred type cannot be named\" error caused by adding `paths` to tsconfig","articleBody":"### 🔎 Search Terms\n\n\"inferred type cannot be named\", \"paths\"\n\n### 🕗 Version \u0026 Regression Information\n\n- This changed in PR #55015\r\n\n\n### ⏯ Playground Link\n\nhttps://github.com/haines/typescript-paths-inferred-type-cannot-be-named\n\n### 💻 Code\n\nPlease see the linked repo (sorry, I couldn't reduce it any further).\n\n### 🙁 Actual behavior\n\nIn a multiproject build where `app` depends on `lib`, setting `paths` in `lib`'s tsconfig breaks `app`'s build with\r\n\r\n```\r\nerror TS2742: The inferred type of '...' cannot be named without a reference to '...'. This is likely not portable. A type annotation is necessary.\r\n```\n\n### 🙂 Expected behavior\n\nAdding `paths` shouldn't break the dependent project.\n\n### Additional information about the issue\n\nJudging by the PR that I was able to bisect to, this seems like it could a bad interaction between `paths` in tsconfig.json and `exports` in package.json.","author":{"url":"https://github.com/haines","@type":"Person","name":"haines"},"datePublished":"2024-03-16T01:53:33.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/57802/TypeScript/issues/57802"}
| 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:3925f4ea-864c-d2d1-bc5b-b992457357e9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A9A4:2DD9E0:40814F:58A07F:6A611B05 |
| html-safe-nonce | 1213e61f9cf16b5ddc390cde56b67d4d105a1fdd415ee56c9bf66a7b9cf8347c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUE0OjJERDlFMDo0MDgxNEY6NThBMDdGOjZBNjExQjA1IiwidmlzaXRvcl9pZCI6Ijc2MTE5NTQ1Njc1MDIxNzQ5ODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9f4a91b99768d7d6c57cbeb09a84571b0b435ab46681414d48f6c52cdaa9ac0f |
| hovercard-subject-tag | issue:2189691743 |
| 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/57802/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1802a6c9f4e854d26f83c44b717546fc987b1a8ca78cd4e5979d369022b3f137/microsoft/TypeScript/issues/57802 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1802a6c9f4e854d26f83c44b717546fc987b1a8ca78cd4e5979d369022b3f137/microsoft/TypeScript/issues/57802 |
| og:image:alt | 🔎 Search Terms "inferred type cannot be named", "paths" 🕗 Version & Regression Information This changed in PR #55015 ⏯ Playground Link https://github.com/haines/typescript-paths-inferred-type-canno... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | haines |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5d23cf1c0cd2fa53870b9a743b3e1bc3ff0d0b0b3a477b50251e1c9dd8ecb93d |
| 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 | abf5a2f79ab9b533c5865f5281057f7d17cf18f3 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width