Overview
Currently experimentalDts does not emit the correct type definitions when moduleResolution is set to either Node16 or NodeNext. The _tsup-dts-rollup.d.ts file is trying to import from the index.d.ts file which causes a circular reference.
_tsup-dts-rollup.d.ts

index.d.ts

Reproduction
- Clone the branch containing the reproduction by running:
git clone -b experimentalDts-NodeNext https://github.com/aryaemami59/repros
- Install the dependencies:
- Run the following command:
- Inspect the output in the
dist directory.
I will submit a PR for the fix.