Skip to content

Error with .d.ts declaration files #136

Open

Description

@MatthD

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

Activity

  1. nonara commented on Dec 4, 2023

    @nonara
    Owner

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions