Title: Switch `libReplacement` to `false` by default · Issue #62214 · microsoft/TypeScript · GitHub
Open Graph Title: Switch `libReplacement` to `false` by default · Issue #62214 · microsoft/TypeScript
X Title: Switch `libReplacement` to `false` by default · Issue #62214 · microsoft/TypeScript
Description: In TypeScript 5.8, we introduced the libReplacement. This flag toggled whether or not TypeScript actually looked for libraries via node_modules/@typescript/lib-* For example, if you have "lib": ["es2015", "dom"] in your settings, TypeScr...
Open Graph Description: In TypeScript 5.8, we introduced the libReplacement. This flag toggled whether or not TypeScript actually looked for libraries via node_modules/@typescript/lib-* For example, if you have "lib": ["e...
X Description: In TypeScript 5.8, we introduced the libReplacement. This flag toggled whether or not TypeScript actually looked for libraries via node_modules/@typescript/lib-* For example, if you have "lib&...
Opengraph URL: https://github.com/microsoft/TypeScript/issues/62214
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Switch `libReplacement` to `false` by default","articleBody":"In TypeScript 5.8, [we introduced the `libReplacement`](https://github.com/microsoft/TypeScript/pull/60829). This flag toggled whether or not TypeScript actually looked for libraries via `node_modules/@typescript/lib-*`\n\nFor example, if you have `\"lib\": [\"es2015\", \"dom\"]` in your settings, TypeScript would try to resolve `@typescript/lib-es2015` and `@typescript/lib-dom` from `node_modules` and load their contents. However, this resolution happened regardless of whether you were using the functionality, and `libReplacement` lets you opt out.\n\nIn TypeScript 7.0 (the native preview), [we've ported `libReplacement` to be `false` by default](https://github.com/microsoft/typescript-go/pull/1262).\n\nTypeScript 6.0 will change the default to `false` to align with TypeScript 7.0\n\nSee more similar discussions around 6.0/7.0 changes at #54500.","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2025-08-06T00:15:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/62214/TypeScript/issues/62214"}
| 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:009d9304-e60e-962a-4260-2b7701195493 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD38:F3F3:1F44A5:2CEBFB:6A5F5E12 |
| html-safe-nonce | bb03ee827ddf0b7717ee2191ca3cad33220d0d25bdc36ba1c44cbbcace1564bd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDM4OkYzRjM6MUY0NEE1OjJDRUJGQjo2QTVGNUUxMiIsInZpc2l0b3JfaWQiOiI0ODE5MzQ3NTE2MDU2Nzc1ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 92cc1bebaa58da25ec092d631055d8a5bb76971387f7d8cd7740417e7f648c1e |
| hovercard-subject-tag | issue:3294767015 |
| 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/62214/issue_layout |
| twitter:image | https://opengraph.githubassets.com/da0b2ad025af7b9f4f4865036405d08c40565496756a98d7d760cc658ce1d005/microsoft/TypeScript/issues/62214 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/da0b2ad025af7b9f4f4865036405d08c40565496756a98d7d760cc658ce1d005/microsoft/TypeScript/issues/62214 |
| og:image:alt | In TypeScript 5.8, we introduced the libReplacement. This flag toggled whether or not TypeScript actually looked for libraries via node_modules/@typescript/lib-* For example, if you have "lib": ["e... |
| 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 | 9a0797c11799dbfd7df57fa3de31c7ea3a4c4bd055eb1a0427a5cde1d4d7ba3f |
| 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 | b099d96da147aea31036cd16b2fba0083a6defe4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width