Skip to content

Generated lib*.d.ts files differ from the files in TypeScript SDK #41597

Description

TypeScript Version: at least 3.9.7 and 4.0.5

The lib/lib*.d.ts and built/local/lib*.d.ts files contain mixed line breaks (LF/CRLF) and differ from the files in the TypeScript SDK, which contain only LF.

Steps to reproduce

Build LKG or local on any operating system.

git clone --config core.autocrlf=input https://github.com/microsoft/TypeScript.git
cd TypeScript
npm ci
gulp LKG

Expected behavior:

Consistent line breaks in lib*.d.ts files and no differences from the TypeScript SDK.

Actual behavior:

Mixed line breaks.

actual-line-breaks

Activity

  1. added
    Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScript
    Effort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".
    on Nov 20, 2020
  2. jakebailey commented on Jul 5, 2023

    @jakebailey
    Member

    Post #51387, this one is definitely fixed as the problem here was the way we combined things with gulp (among other things). In the new build, the entirety of built and lib now consistently use LF line endings.

  3. deniskovalchuk commented on Jul 6, 2023

    @deniskovalchuk
    Author

    Jake Bailey (@jakebailey), I've tested TypeScript 5.1.6 and can confirm that this problem has been fixed. Thank you!

  4. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptEffort: ModerateRequires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual".Help WantedYou can do this

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions