{"action":"created","issue":{"url":"https://api.github.com/repos/aurelia/event-aggregator/issues/13","labels_url":"https://api.github.com/repos/aurelia/event-aggregator/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/aurelia/event-aggregator/issues/13/comments","events_url":"https://api.github.com/repos/aurelia/event-aggregator/issues/13/events","html_url":"https://github.com/aurelia/event-aggregator/pull/13","id":106376590,"number":13,"title":"Add typescript version of event aggregator","user":{"login":"ctoran","id":10962393,"avatar_url":"https://avatars.githubusercontent.com/u/10962393?v=3","gravatar_id":"","url":"https://api.github.com/users/ctoran","html_url":"https://github.com/ctoran","followers_url":"https://api.github.com/users/ctoran/followers","following_url":"https://api.github.com/users/ctoran/following{/other_user}","gists_url":"https://api.github.com/users/ctoran/gists{/gist_id}","starred_url":"https://api.github.com/users/ctoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctoran/subscriptions","organizations_url":"https://api.github.com/users/ctoran/orgs","repos_url":"https://api.github.com/users/ctoran/repos","events_url":"https://api.github.com/users/ctoran/events{/privacy}","received_events_url":"https://api.github.com/users/ctoran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2015-09-14T16:16:17Z","updated_at":"2015-11-10T07:06:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aurelia/event-aggregator/pulls/13","html_url":"https://github.com/aurelia/event-aggregator/pull/13","diff_url":"https://github.com/aurelia/event-aggregator/pull/13.diff","patch_url":"https://github.com/aurelia/event-aggregator/pull/13.patch"},"body":"Generates more precise type declarations including:\r\n  - overloads for pub/sub methods\r\n  - type inference of the message using generics\r\n  - hides private class members\r\n \r\nBuild it with `gulp build`\r\n\r\nThis PR replaces the original ES6 event aggregator with the equivalent TypeScript code. The TS code is first compiled to ES6 using typescript and then to ES5 using babel for each module type. Also SourceMap is generated in outputs so you can step-through the source TS code in debugger while running an ES5 compilation.\r\n\r\nTo make it easier to review the change, just diff `index.ts` with the old `index.js` ([see here](https://github.com/ctoran/event-aggregator/commit/e2c435277206c999d8377cca99d578f6697f2c27#diff-f41e9d04a45c83f3b6f6e630f10117fe))."},"comment":{"url":"https://api.github.com/repos/aurelia/event-aggregator/issues/comments/155333426","html_url":"https://github.com/aurelia/event-aggregator/pull/13#issuecomment-155333426","issue_url":"https://api.github.com/repos/aurelia/event-aggregator/issues/13","id":155333426,"user":{"login":"ctoran","id":10962393,"avatar_url":"https://avatars.githubusercontent.com/u/10962393?v=3","gravatar_id":"","url":"https://api.github.com/users/ctoran","html_url":"https://github.com/ctoran","followers_url":"https://api.github.com/users/ctoran/followers","following_url":"https://api.github.com/users/ctoran/following{/other_user}","gists_url":"https://api.github.com/users/ctoran/gists{/gist_id}","starred_url":"https://api.github.com/users/ctoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctoran/subscriptions","organizations_url":"https://api.github.com/users/ctoran/orgs","repos_url":"https://api.github.com/users/ctoran/repos","events_url":"https://api.github.com/users/ctoran/events{/privacy}","received_events_url":"https://api.github.com/users/ctoran/received_events","type":"User","site_admin":false},"created_at":"2015-11-10T07:06:23Z","updated_at":"2015-11-10T07:06:23Z","body":"Hi guys, sorry I was away for a while and missed the discussion. @EisenbergEffect please feel free to use the .d.ts file, no need to wait for a PL from me. I mostly did this as a proof of concept to see how it works. Regarding ditching Babel for TypeScript I had some issues with loading modules when targeting TS directly to ES5. Also some experimental features like async/await work only when ES6 is targeted, so even though using 100% TS may work for this project, it won't work very well for larger projects. That's why I ended up using dual compilation. Sorry again for not being around to answer."}}