{"action":"created","issue":{"url":"https://api.github.com/repos/excaliburjs/Excalibur/issues/675","repository_url":"https://api.github.com/repos/excaliburjs/Excalibur","labels_url":"https://api.github.com/repos/excaliburjs/Excalibur/issues/675/labels{/name}","comments_url":"https://api.github.com/repos/excaliburjs/Excalibur/issues/675/comments","events_url":"https://api.github.com/repos/excaliburjs/Excalibur/issues/675/events","html_url":"https://github.com/excaliburjs/Excalibur/issues/675","id":186957562,"number":675,"title":"Is Excalibur typescript 2.0 compatible?","user":{"login":"hogart","id":138504,"avatar_url":"https://avatars.githubusercontent.com/u/138504?v=3","gravatar_id":"","url":"https://api.github.com/users/hogart","html_url":"https://github.com/hogart","followers_url":"https://api.github.com/users/hogart/followers","following_url":"https://api.github.com/users/hogart/following{/other_user}","gists_url":"https://api.github.com/users/hogart/gists{/gist_id}","starred_url":"https://api.github.com/users/hogart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hogart/subscriptions","organizations_url":"https://api.github.com/users/hogart/orgs","repos_url":"https://api.github.com/users/hogart/repos","events_url":"https://api.github.com/users/hogart/events{/privacy}","received_events_url":"https://api.github.com/users/hogart/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2016-11-03T00:48:55Z","updated_at":"2016-11-03T14:31:47Z","closed_at":"2016-11-03T14:28:04Z","body":"Sorry if this is wrong place to ask questions, but forum seems deserted.\r\n\r\nMy problem is that I want to use Excalibur with TypeScript and webpack. I was able to setup webpack and ts compiler so everything works, including loading 3rd-party libs installed with npm (e.g. lodash). It looks like this: https://github.com/hogart/excalibur-test. But at the moment I add `import {ex} from 'excalibur';` I get an `error TS2306: File '<path-to-project>/node_modules/excalibur/dist/excalibur.d.ts' is not a module.`. \r\n\r\nI looked at how lodash .d.ts is written and manually added following to `dist/excalibur.d.ts`:\r\n\r\n```ts\r\nexport = ex;\r\nexport as namespace ex;\r\n```\r\n\r\nThis did the trick, `ex.Engine` was properly imported and initialized, but this can't be called a solution.\r\n\r\nSince I'm pretty new to TS, I'm bit lost. Am I missing something in my `tsconfig.json`? Can this issue be fixed with some custom .d.ts. which re-exports `ex` namespace? Should I downgrade to TypeScript 1.8, since this version used for developing Excalibur?"},"comment":{"url":"https://api.github.com/repos/excaliburjs/Excalibur/issues/comments/258158752","html_url":"https://github.com/excaliburjs/Excalibur/issues/675#issuecomment-258158752","issue_url":"https://api.github.com/repos/excaliburjs/Excalibur/issues/675","id":258158752,"user":{"login":"kamranayub","id":563819,"avatar_url":"https://avatars.githubusercontent.com/u/563819?v=3","gravatar_id":"","url":"https://api.github.com/users/kamranayub","html_url":"https://github.com/kamranayub","followers_url":"https://api.github.com/users/kamranayub/followers","following_url":"https://api.github.com/users/kamranayub/following{/other_user}","gists_url":"https://api.github.com/users/kamranayub/gists{/gist_id}","starred_url":"https://api.github.com/users/kamranayub/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kamranayub/subscriptions","organizations_url":"https://api.github.com/users/kamranayub/orgs","repos_url":"https://api.github.com/users/kamranayub/repos","events_url":"https://api.github.com/users/kamranayub/events{/privacy}","received_events_url":"https://api.github.com/users/kamranayub/received_events","type":"User","site_admin":false},"created_at":"2016-11-03T14:31:47Z","updated_at":"2016-11-03T14:31:47Z","body":"Appreciate it, we still have some work to do. Maybe tonight I will write up a guide on using Ex with module loaders and add it to the docs. @eonarheim did a similar monkey patch for https://github.com/eonarheim/TypeState/pull/13 to support module loading with TS, we could do it the same way."}}
{"actor":{"display_login":"kamranayub"}}