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

Resolve relative paths #65

Open
dougludlow opened this issue Mar 30, 2016 · 5 comments
Open

Resolve relative paths #65

dougludlow opened this issue Mar 30, 2016 · 5 comments
Labels

Comments

@dougludlow
Copy link

I have a project where I'm creating a .d.ts file for angular2. Using dts-generator, I'm able to create one, but with one issue: all relative paths are not resolved. I had to manually resolve the 394 relative paths by hand. Is there a way to make dts-generator resolve the paths to dependent imports?

Here's my project: https://github.com/dougludlow/angular2-typings

@dougludlow
Copy link
Author

Here's an example of a relative path: https://github.com/dougludlow/angular2-typings/blob/e507fa38a31ec4a4c42cb465a2a33a540718f469/typings/angular2/angular2.d.ts#L1008

declare module 'angular2/src/core/change_detection/directive_record' {
    import { ChangeDetectionStrategy } from './constants';
    ...
}

Should be:

declare module 'angular2/src/core/change_detection/directive_record' {
    import { ChangeDetectionStrategy } from 'angular2/src/core/change_detection/constants';
    ...
}

@kitsonk kitsonk added the bug label Jun 16, 2016
@kitsonk kitsonk self-assigned this Jun 16, 2016
@scniro
Copy link

scniro commented Oct 27, 2016

+1 ... Any update on this?

@dylans
Copy link
Contributor

dylans commented Oct 27, 2016

@scniro unfortunately no, but we'd like to get to it. We'd of course review and accept a PR.

@paztis
Copy link

paztis commented Apr 10, 2019

Hi all,

This PR will resolve the problem: #124

Solution is similar to @vtrifonov solution but a little simpler. It also respect the indentation ^^
If you can approve it it will be great as this problem is still open since one year.

@paztis
Copy link

paztis commented Apr 10, 2019

For info tthe unit tests are not working at all for the module due to tslint / typescript version problems.
My commits are not responsible of the travis problems: they are present also without them

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

5 participants