Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Tilde in generated module names #528

Closed
tomitrescak opened this issue May 19, 2016 · 4 comments
Closed

Tilde in generated module names #528

tomitrescak opened this issue May 19, 2016 · 4 comments
Labels

Comments

@tomitrescak
Copy link

This is more of question than issue. When you generate the .d.ts file you use a lot of tildes in the mosule names, e.g. ~redux-thunk/redux-thunk or even ~redux-thunk~redux/redux

I tried to find the documentation what those tildes represent but I failed. To be hones they are a bit unnerving, when I cannot understand which modules it represents.

For example, which module is actually covered by ~redux-thunk~redux/redux ?

@blakeembrey
Copy link
Member

It's namespacing for dependencies. Not sure what you're asking by "covered", but that path means it's redux-thunk -> redux/redux.d.ts wrapped in a module declaration.

@tomitrescak
Copy link
Author

And why is that necessary? Doesn't redux.d.ts define its own dependencies, while redux-thunk as well? It seems that I have several redux typings versions spread across my typings files. Sorry about dumb questions.

@blakeembrey
Copy link
Member

You can probably find more detailed answers elsewhere (E.g. #72) but in short - it's the naive NPM v2 solution. Different typings could have slightly differing versions, to flatten it results in all the shortcomings that come with using TSD. Instead, it's easy to implement a naive NPM v2-style algorithm that everyone can use. If someone wants to invest in a v3-style algorithm (E.g. de-duping) that would be amazing, but it's a huge investment and really not that much of a payoff.

@tomitrescak
Copy link
Author

Thanks Blake!

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

No branches or pull requests

2 participants