I have a package that only imports and exports TypeScript types. It has two files, index.ts and dom.ts, and index.ts relatively imports from dom.ts but not the other way around:
https://github.com/MasterKale/SimpleWebAuthn/tree/master/packages/types
I noticed recently that when my package builds, the types in these two files are being output to ${outDir}/types/ as .d.ts as expected...

...and declared in package.json as expected:
"exports": {
".": {
"import": {
"types": "./types/index.d.ts",
"default": "./esm/index.js"
},
"require": {
"types": "./types/index.d.ts",
"default": "./script/index.js"
}
}
}
However when I open up ${outDir}/types/index.d.ts I see that the import type and export type statements are transformed by dnt to import from "./dom.js":

This is breaking the ability to Go To Definition on a type contained in dom.ts in libraries installing this package from NPM. I tried using mappings to replace the path, but as this isn't really what mappings is intended for of course it didn't work.
I have a package that only imports and exports TypeScript
types. It has two files, index.ts and dom.ts, and index.ts relatively imports from dom.ts but not the other way around:https://github.com/MasterKale/SimpleWebAuthn/tree/master/packages/types
I noticed recently that when my package builds, the types in these two files are being output to ${outDir}/types/ as .d.ts as expected...
...and declared in package.json as expected:
However when I open up ${outDir}/types/index.d.ts I see that the
import typeandexport typestatements are transformed by dnt to import from "./dom.js":This is breaking the ability to Go To Definition on a type contained in dom.ts in libraries installing this package from NPM. I tried using
mappingsto replace the path, but as this isn't really whatmappingsis intended for of course it didn't work.