Skip to content

3.2.0 - Type instantiation is excessively deep and possibly infinite. #8079

@bodinsamuel

Description

@bodinsamuel

Describe the bug

Hi team,
Wanted to test the new version but it's not playing well with type-fest JsonValue. Not sure why.

Reproduction

import type { JsonValue } from 'type-fest';

    it('should succeed', async () => {
        const a = {} as JsonValue;
        const b = {} as JsonValue;
        expect(a).toStrictEqual(b);
    });
rror TS2589: Type instantiation is excessively deep and possibly infinite.

44         expect(a).toStrictEqual(b);
           ~~~~~~~~~~~~~~~~~~~~~~~~~~

System Info

System:
    OS: macOS 15.3.1
    CPU: (8) arm64 Apple M3
    Memory: 194.81 MB / 24.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
    pnpm: 9.6.0 - ~/.nvm/versions/node/v20.12.2/bin/pnpm
    bun: 1.1.29 - ~/.bun/bin/bun
  Browsers:
    Chrome: 136.0.7103.114
    Safari: 18.3

Used Package Manager

npm

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions