{"action":"created","issue":{"url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/issues/250","repository_url":"https://api.github.com/repos/typed-ember/ember-cli-typescript","labels_url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/issues/250/labels{/name}","comments_url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/issues/250/comments","events_url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/issues/250/events","html_url":"https://github.com/typed-ember/ember-cli-typescript/issues/250","id":354047840,"node_id":"MDU6SXNzdWUzNTQwNDc4NDA=","number":250,"title":"[RFC / Quest] Decomposing types into @ember modules","user":{"login":"mike-north","id":558005,"node_id":"MDQ6VXNlcjU1ODAwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/558005?v=4","gravatar_id":"","url":"https://api.github.com/users/mike-north","html_url":"https://github.com/mike-north","followers_url":"https://api.github.com/users/mike-north/followers","following_url":"https://api.github.com/users/mike-north/following{/other_user}","gists_url":"https://api.github.com/users/mike-north/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-north/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-north/subscriptions","organizations_url":"https://api.github.com/users/mike-north/orgs","repos_url":"https://api.github.com/users/mike-north/repos","events_url":"https://api.github.com/users/mike-north/events{/privacy}","received_events_url":"https://api.github.com/users/mike-north/received_events","type":"User","site_admin":false},"labels":[{"id":985371538,"node_id":"MDU6TGFiZWw5ODUzNzE1Mzg=","url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/labels/RFC","name":"RFC","color":"000000","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-08-25T22:24:20Z","updated_at":"2018-09-25T13:44:49Z","closed_at":"2018-09-25T03:04:37Z","author_association":"COLLABORATOR","body":"### Motivation\r\n\r\n\r\nThe [2.16 changes around how framework modules are consumed](https://www.emberjs.com/blog/2017/10/11/ember-2-16-released.html#toc_ember-js-modules-api) was intended to get people importing parts of the framework in this new way, with the aim of making it possible to incrementally refactor `ember-source` into independent npm modules without breaking consumers' apps.\r\n\r\n### Goals\r\n\r\n- [x] Allow consumers to use the Ember types by importing from the appropriate `@ember/*` modules \r\n- [x] Break the types up into individual files instead of one massive `index.d.ts`\r\n\t- [x] Allow our types to be more easily browsable for consumers, by reflecting the paths of the ES6 imports (i.e., `import ComputedProperty from '@ember/object/computed';` should be found in `node_modules/@types/@ember/object/computed.d.ts`\r\n- [x] Make the `@ember` modules the source of truth, with the `'ember'` module re-exporting in the pre-2.16 style\r\n- [x] These changes should be **incremental** and **non-breaking**, assuming consumers stay reasonably up-to-date with `ember-cli-typescript`\r\n- [x] Consumers should get **clear** and **actionable** feedback if any action is required on their part to receive a great developer experience\r\n\r\n#### Nice To Have\r\n- [x] Replace most of our `declare module '@ember/foo'` stuff with simply having a `*.d.ts` file in the right place.\r\n- [x] Extremely low churn in consumers' `package.json`\r\n\r\n### Proposed Strategy\r\n\r\n- [x] 1. **Re-export everything from `'ember'` through the appropriate `@ember/*` modules**\r\n\r\n\tThis is already done.\r\n\r\n- [x] 2. **Create a new `@types/` package for [each of the top-level `@ember` modules](https://github.com/emberjs/ember.js/tree/master/packages/%40ember) that `ember-source` ships**.\r\n\t\r\n\tMost of you are probably aware of the `types-publisher` limitations around packages where npm module and ES6 module paths misalign. This is one reason we have everything in a single massive `index.d.ts` file.\r\n\r\n\tAdditionally, there are [limitations around scoped packages](https://github.com/Microsoft/types-publisher/issues/155) in `types-publisher` prevent us from exposing multiple `@ember/*` types from a single module (other than a bunch of `declare module '@ember/******'` stuff. For this reason, we **cannot** have a single (conceptual equivalent of) `@types/@ember` that contains everything. We must create individual subfolders for `@types/ember__object`, `@types/ember__component`, etc... Each of these will be independently versioned and independently published by `types-publisher`.\r\n\r\n   - [x] 2.1 **Create a new `*.d.ts` file for every ES6 module we currently provide types for**\r\n\r\n\t\tThese modules will initially contain **only** the re-export stuff (one `*.d.ts` file per ES6 module we currently provide types for), bringing in `@types/ember` as a dependency via ~a triple-slash directive~ a module import. The only tests that should be in these new type packages are those that protect against regression within the re-exporting.\r\n\r\n- [x] 3. **Add the new `@types/ember__*` packages as dependencies to `@types/ember`**\r\n\r\n\r\n- [x] 4. **In no less than one PR per `@ember` package, incrementally move the source of truth for the types from `@types/ember` to the respective `@types/ember__*`**\r\n\r\n\tOnce each of these PRs is complete, `@types/ember` will then depend on the respective `@types/ember__*` via a triple-slash directive.\r\n\r\n--- \r\n\r\n## [PROJECT DASHBOARD](https://github.com/orgs/typed-ember/projects/2)"},"comment":{"url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/issues/comments/424349009","html_url":"https://github.com/typed-ember/ember-cli-typescript/issues/250#issuecomment-424349009","issue_url":"https://api.github.com/repos/typed-ember/ember-cli-typescript/issues/250","id":424349009,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNDM0OTAwOQ==","user":{"login":"chriskrycho","id":2403023,"node_id":"MDQ6VXNlcjI0MDMwMjM=","avatar_url":"https://avatars0.githubusercontent.com/u/2403023?v=4","gravatar_id":"","url":"https://api.github.com/users/chriskrycho","html_url":"https://github.com/chriskrycho","followers_url":"https://api.github.com/users/chriskrycho/followers","following_url":"https://api.github.com/users/chriskrycho/following{/other_user}","gists_url":"https://api.github.com/users/chriskrycho/gists{/gist_id}","starred_url":"https://api.github.com/users/chriskrycho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriskrycho/subscriptions","organizations_url":"https://api.github.com/users/chriskrycho/orgs","repos_url":"https://api.github.com/users/chriskrycho/repos","events_url":"https://api.github.com/users/chriskrycho/events{/privacy}","received_events_url":"https://api.github.com/users/chriskrycho/received_events","type":"User","site_admin":false},"created_at":"2018-09-25T13:44:49Z","updated_at":"2018-09-25T13:44:49Z","author_association":"CONTRIBUTOR","body":"Excellent work here, @mike-north! Thanks for driving this forward!"}}
{"actor":{"display_login":"chriskrycho"}}