镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Switch libReplacement to false by default #62214

Closed

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, 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.

In TypeScript 7.0 (the native preview), we've ported libReplacement to be false by default.

TypeScript 6.0 will change the default to false to align with TypeScript 7.0

See more similar discussions around 6.0/7.0 changes at #54500.

Metadata

Metadata

Labels

Breaking ChangeWould introduce errors in existing codeCommittedThe team has roadmapped this issueSuggestionAn idea for TypeScript

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions