Skip to content

[Bug]: Typia requires isolatedModules to be false #4934

@ruiaraujo

Description

@ruiaraujo

Version

29.4.0

Steps to reproduce

https://github.com/ruiaraujo/ts-jest-typia-bug for a repro.

With isolatedModules set to false, the tests pass. Set to true, the tests fail.

When I checked the compiled output, I could see that typia output was not included.
When I debugged, I did see the transform function being called for both cases but I did not yet dig further.

I suspect the root cause is connected to this issue

Expected behavior

The tests should pass regardless of the isolatedModules option.

Actual behavior

Failure when isolatedModules is true

Debug log

Files available in the repo for both state of isolatedModules
ts-jest-false.json
ts-jest-true.json

Additional context

No response

Environment

System:
    OS: macOS 15.5
    CPU: (10) arm64 Apple M1 Max
  Binaries:
    Node: 20.11.1
    npm: 10.2.4 
    pnpm: 10.6.5
  npmPackages:
    jest: ^30.0.4 => 30.0.4

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions