Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for relative path conversion on .d.ts files #1749

Open
1 task done
Farenheith opened this issue Aug 18, 2022 · 0 comments
Open
1 task done

Support for relative path conversion on .d.ts files #1749

Farenheith opened this issue Aug 18, 2022 · 0 comments
Labels

Comments

@Farenheith
Copy link

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

If I use nest build and my project emits .d.ts files, they still have to use the aliased path on the imports, what not happen with .js.

For test purposes, let's have this path configured:

    "paths": {
      "@core/*": [
        "./src/*"
      ]

I have one file with this line:

export * from '@core/test';

When I transpile it emitting types, the .js looks fine:

__exportStar(require("./test"), exports);

Which is fine, but the .d.ts still looks like this:

export * from '@core/test';

This causes a bad type detection if I use nest build to compile a library, for example, and try to import it into some other project.

Describe the solution you'd like

Replace the aliased path by the relative one also in the .d.ts files when compilng

Teachability, documentation, adoption, migration strategy

No response

What is the motivation / use case for changing the behavior?

If the aliased path could be replaced by the relative one also in the .d.ts files, it would allow us to use nest build even to compile a library, for example, letting us have the easiness of using the aliased path in any kind o project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant