Skip to content

Regression in TypeScript 5.4: "Excessive stack depth comparing types" errors #80

@MajorLift

Description

@MajorLift

An unknown breaking change in TypeScript v5.4 is causing errors:

  • The first stable release that triggers this issue is v5.4.2
  • TypeScript version downgraded to v5.3.3 in main branch as a temporary fix: 8843a71
  • All 47 errors are "TS2321: Excessive stack depth comparing types..."
src/natural-number/modulo.ts:15:46 - error TS2321: Excessive stack depth comparing types '_$divide<A_LIST, B_LIST, "MODULO">' and 'readonly Digit[]'.

15   MODULUS_LIST extends DigitList.DigitList = DigitList._$modulo<A_LIST, B_LIST>,
                                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 47 errors in 10 files.

Errors  Files
     3  src/digit-list/divide.ts:70
     8  src/integer/divide-by.ts:7
     8  src/integer/divide.ts:61
     1  src/integer/modulo.ts:31
     1  src/integer/remainder.ts:22
     8  src/list/range.ts:20
     1  src/list/reverse.ts:30
     8  src/natural-number/divide-by.ts:7
     8  src/natural-number/divide.ts:47
     1  src/natural-number/modulo.ts:15

CI run error log: https://github.com/poteat/hkt-toolbelt/actions/runs/8399043832/job/23004659944

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions