Skip to content
This repository has been archived by the owner on Apr 30, 2019. It is now read-only.

Resolve dependencies for linked bundles #123

Open
koloboid opened this issue Feb 8, 2015 · 5 comments
Open

Resolve dependencies for linked bundles #123

koloboid opened this issue Feb 8, 2015 · 5 comments

Comments

@koloboid
Copy link

koloboid commented Feb 8, 2015

Linking from bundles (tsd link) is great feature, but there are little improvement needed - install typings dependencies from linked module. For example - my library uses expressjs, and re-exports some types from express (function that receives express.Request as param for example). Internally, this library uses express.d.ts typings from tsd, but it can't export this typings up to application, coz it can use express too, and there will be conflict (due to express.d.ts will placed in different directories in this case). So, library user must install deps (express) manually. It would be great, if "typescript" section of package.json (or bower) will have "dependencies" array (or something like) with names of deps, which can be installed to project during "tsd link"
Thanks for you project and time

@blakeembrey
Copy link
Member

👍

@blakeembrey blakeembrey mentioned this issue May 1, 2015
7 tasks
@zakhenry
Copy link

This is a much needed feature, unless I am missing something the only way that I can import a bower/npm package that has it's own typing references is to not do tsd link and just interact with the module without any typscript goodies.

@blakeembrey
Copy link
Member

@xiphiaz You can definitely import a module definition, but it gets messy when it's a sub-dependency. That's the goal for 0.7, to fix this issue for good. For now, distributed packages will need sub-dependencies to be referenced manually and not referenced in the definition.

@zakhenry
Copy link

@blakeembrey ok I'm confused how I can get this to work for me as I am loading https://github.com/spira/angular-rest-adapter/blob/master/dist/ngRestAdapter.d.ts in as a bower dependency, linked via tsd link however it references the typings file relative to that repository.

My parent application is trying to load the dependencies from both ngRestAdapter.d.tsd and it's own local tsd.d.ts file but there is a conflict between a lot of modules.

Can I suppress this error in any way as it doesn't strike me as a being fatal error?

@blakeembrey
Copy link
Member

@xiphiaz For now, you'd have to ask them to remove https://github.com/spira/angular-rest-adapter/blob/master/dist/ngRestAdapter.d.ts#L1 as it's referencing all their own typings which conflict with yours.

Edit: This is where current definition management gets messy. We want to make it easier, but it'll take some time.

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

No branches or pull requests

3 participants