ts-patch icon indicating copy to clipboard operation
ts-patch copied to clipboard

Error with .d.ts declaration files

Open MatthD opened this issue 1 year ago • 1 comments

In my project I am using ts-patch as a replacement of ttypescript/

But I have an issue that it let the .d.ts file import which ttypescript did not . leading me to issues (js cannot import tis kind of file)

So to explain I have just a src/file.ts that do this

import declarations from 'file-declaration';

Which is an alias path inside tsconfig to schemas/lib/index.d.ts

but the output is this one

const declaration_1 = __importDefault(require("../../schemas/lib"));

And cause the issue

MatthD avatar Nov 24 '23 14:11 MatthD

Hello. Thanks for the report.

What versions of TS and TSP are you using? What transformer are you using?

If possible, can you provide a reproduction and some more details? If not, the above info will still help.

Thanks!

nonara avatar Dec 04 '23 00:12 nonara