Title: Design Meeting Notes, 2/16/2024 · Issue #57425 · microsoft/TypeScript · GitHub
Open Graph Title: Design Meeting Notes, 2/16/2024 · Issue #57425 · microsoft/TypeScript
X Title: Design Meeting Notes, 2/16/2024 · Issue #57425 · microsoft/TypeScript
Description: Other ways to extend contents of tsconfig.json files #56436 Want people to be able to merge properties from other tsconfig.jsons. Today, you can only override them, sometimes don't inherit them. Could look like an array of properties you...
Open Graph Description: Other ways to extend contents of tsconfig.json files #56436 Want people to be able to merge properties from other tsconfig.jsons. Today, you can only override them, sometimes don't inherit them. Co...
X Description: Other ways to extend contents of tsconfig.json files #56436 Want people to be able to merge properties from other tsconfig.jsons. Today, you can only override them, sometimes don't inherit them...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/57425
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 2/16/2024","articleBody":"# Other ways to extend contents of `tsconfig.json` files\r\n\r\nhttps://github.com/microsoft/TypeScript/issues/56436\r\n\r\n* Want people to be able to merge properties from other `tsconfig.json`s.\r\n * Today, you can only override them, sometimes don't inherit them.\r\n * Could look like an array of properties you want merged, or an object that can be merged.\r\n * Could also look like a field called `extends` or `merge` which implies merging behavior for every listed property, and can add contents as well.\r\n* It's not just merging - also want to be able to do a \"raw\" copy so that things become relative to the current `tsconfig.json`\r\n * e.g. inherit `outDir` in a way where things become relative to the current `tsconfig.json`, rather than being normalized and copied from the original `tsconfig.json`\r\n * One idea is to have a `raw` field (similar to a `merge` field) that lists the properties you want to do a raw copy of.\r\n * Another option is to use an interpolation string like `\"${workspaceDir}\"`.\r\n * Some support around this idea because it's similar to `tsconfig.json`.\r\n* Having a weird time understanding use-cases with `references` due to transitive dependencies?\r\n * Something with dual builds.\r\n* Agree with solving the problem space, but trying to find good ergnomics.\r\n* Are there order-dependency risks?\r\n * Path mapping, type roots, stuff like that.\r\n* Could have imagined if we did it all over again today, we'd do `compilerOptions` being overrides, and `mergedCompilerOptions`.\r\n* If we did it all over again, would we have just picked merge as the default strategy?\r\n * Certainly for `paths`, `typeRoots`, maybe `lib`.\r\n * In a sense we do merge, but it's just not deep.\r\n* So should we try to change the default of how `tsconfig.json` inheritance operates?\r\n * Fix everything in TypeScript 6.0\r\n * That might be a way bigger break than you realize!\r\n* VS Code does automatic merging and interpolated variables.\r\n * No way to override! Only merge!\r\n* If we did interpolated variables.\r\n * Path of configuration file\r\n * `configLocation`\r\n * `configFolder`\r\n * `configDirectory`\r\n * `projectLocation`\r\n * `projectFolder`\r\n * `projectDirectory`\r\n * `fileName` - could model a project build for different targets like `tsconfig.cjs.json` and `tsconfig.esm.json`\r\n * \"Please let's not talk about project references here.\"\r\n * *Editor's note: :(*\r\n* Consensus around introducing an variable name like `${configDirectory}` once we know what the actual name is.\r\n\r\n# Instantiate earlier inferred constraints in conditional type\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/57362\r\n\r\n* Bug a long time ago - type parameters would leak when they referred to themselves in a conditional type extends clause.\r\n* Fixed the issue for a subset of types that were considered directly generic - but not instantiations of object types with type parameters.\r\n* New fix includes the `infer` type parameters in the new inference context.\r\n* ✅\r\n\r\n# Avoid creating rest elements with `errorType` when `any` is spread\r\n\r\nhttps://github.com/microsoft/TypeScript/pull/57116\r\n\r\n* Made a change where if you spread in something of type `any` into the end of an array and then try to destructure it, you end up with `unknown[]`.\r\n * Why? When you spread `any`, you end up with `errorType` as the rest element type. But then you end up with `unknown[]` when you slice the end off.\r\n* The PR seems right, maybe lacking a test for spreading in other kinds of `any` types like the error type itself.\r\n* ✅","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2024-02-16T19:56:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/57425/TypeScript/issues/57425"}
| 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:1d40a6d6-8c17-1324-47b6-45df74971fb5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 938E:115C32:3D35CD:51E119:6A614EC7 |
| html-safe-nonce | 51d8017cf6906f1d507fba2c8b9b04fde105293e8e1855a54e8c23c891709be2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzhFOjExNUMzMjozRDM1Q0Q6NTFFMTE5OjZBNjE0RUM3IiwidmlzaXRvcl9pZCI6IjU0MjA4MzE0NTMzMTk2MTQxNTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 6af2ab2ce71bc3b8c0fa8678bdff5283c5452ba122c8f9b10d8a62eed601d74a |
| hovercard-subject-tag | issue:2139337363 |
| 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/57425/issue_layout |
| twitter:image | https://opengraph.githubassets.com/efdf6ae1b4a2253de2f1b6ffcc6492d98d0ad4ab2dc599f5bd6d2d0d379f326d/microsoft/TypeScript/issues/57425 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/efdf6ae1b4a2253de2f1b6ffcc6492d98d0ad4ab2dc599f5bd6d2d0d379f326d/microsoft/TypeScript/issues/57425 |
| og:image:alt | Other ways to extend contents of tsconfig.json files #56436 Want people to be able to merge properties from other tsconfig.jsons. Today, you can only override them, sometimes don't inherit them. Co... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DanielRosenwasser |
| hostname | github.com |
| expected-hostname | github.com |
| None | 35b919fdb8e6752d2ed95a144e761ca5e924557563e2ed0a5ebf6c4430cdeeb6 |
| 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 | 1e22b08b60ccb67c3791f565bed248565260e611 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width