Skip to content

Why so many @types packages for Ember but only one ember-source? #1495

Answered by chriskrycho
machty asked this question in Q&A
Discussion options

You must be logged in to vote

The short answer is: so that autocomplete works "out of the box".

By default, tools powered by the TS Language Service do not auto-import from your transitive dependencies—which is as you want, because you only want to suggest completions from your direct dependencies, so that you don't get broken if your direct dependencies' relationship to their transitive dependencies change.

This is essentially a knock-on effect of the fact that Ember ships the umbrella package but that you literally never import directly from ember-source.

There are other ways we could work around this. For example, we could bundle all the definitions with a single ember-source package… but for auto-complete to work …

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@machty
Comment options

@chriskrycho
Comment options

@machty
Comment options

@machty
Comment options

Answer selected by chriskrycho
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants