Closed aryaemami59 closed 1 month ago
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.
experimentalDts
moduleResolution
Node16
NodeNext
_tsup-dts-rollup.d.ts
index.d.ts
git clone -b experimentalDts-NodeNext https://github.com/aryaemami59/repros
yarn install
yarn run build:node-next
dist
I will submit a PR for the fix.
Overview
Currently
experimentalDts
does not emit the correct type definitions whenmoduleResolution
is set to eitherNode16
orNodeNext
. The_tsup-dts-rollup.d.ts
file is trying to import from theindex.d.ts
file which causes a circular reference.
![rollup](https://github.com/user-attachments/assets/a9b58ea7-6471-487a-a166-7d012698da1b)_tsup-dts-rollup.d.ts
![index-circular](https://github.com/user-attachments/assets/5e4b966e-8d21-416d-b538-dd93e7b56238)index.d.ts
Reproduction
dist
directory.I will submit a PR for the fix.