{"action":"created","issue":{"url":"https://api.github.com/repos/xtermjs/xterm.js/issues/917","repository_url":"https://api.github.com/repos/xtermjs/xterm.js","labels_url":"https://api.github.com/repos/xtermjs/xterm.js/issues/917/labels{/name}","comments_url":"https://api.github.com/repos/xtermjs/xterm.js/issues/917/comments","events_url":"https://api.github.com/repos/xtermjs/xterm.js/issues/917/events","html_url":"https://github.com/xtermjs/xterm.js/issues/917","id":252739584,"number":917,"title":"xterm doesn't appear to interact properly with typescript and requirejs","user":{"login":"dgriffen","id":8010244,"avatar_url":"https://avatars2.githubusercontent.com/u/8010244?v=4","gravatar_id":"","url":"https://api.github.com/users/dgriffen","html_url":"https://github.com/dgriffen","followers_url":"https://api.github.com/users/dgriffen/followers","following_url":"https://api.github.com/users/dgriffen/following{/other_user}","gists_url":"https://api.github.com/users/dgriffen/gists{/gist_id}","starred_url":"https://api.github.com/users/dgriffen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgriffen/subscriptions","organizations_url":"https://api.github.com/users/dgriffen/orgs","repos_url":"https://api.github.com/users/dgriffen/repos","events_url":"https://api.github.com/users/dgriffen/events{/privacy}","received_events_url":"https://api.github.com/users/dgriffen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-08-24T21:41:40Z","updated_at":"2018-02-14T20:23:01Z","closed_at":"2017-10-02T15:49:37Z","author_association":"CONTRIBUTOR","body":"<!-- Enter your issue description here -->\r\nWhen using xterm with typescript set to compile to AMD modules xterm doesn't appear to interact properly with requirejs. A snippet of the typescript code is below\r\n\r\n```typescript\r\nimport { Terminal } from 'xterm';\r\n\r\nvar someObject = new Terminal({\r\n    cols: 80,\r\n    rows: 24\r\n});\r\n```\r\n\r\nThe generated code looks like this:\r\n```javascript\r\ndefine([\"require\", \"exports\", \"xterm\"], function (require, exports, xterm_1) {\r\n    var someObject = new xterm_1.Terminal({\r\n        cols: 80,\r\n        rows: 24\r\n});\r\n```\r\n\r\nThe problem is that the `xterm_1` object is actually the terminal object, so the code will fail at runtime. I tried playing with the definition file to get it to work but I did not have any success.\r\n\r\n## Details\r\n- Browser and browser version:  Firefox Nightly\r\n- OS version: Windows 10\r\n- xterm.js version: 2.8.1"},"comment":{"url":"https://api.github.com/repos/xtermjs/xterm.js/issues/comments/365733559","html_url":"https://github.com/xtermjs/xterm.js/issues/917#issuecomment-365733559","issue_url":"https://api.github.com/repos/xtermjs/xterm.js/issues/917","id":365733559,"user":{"login":"dgriffen","id":8010244,"avatar_url":"https://avatars2.githubusercontent.com/u/8010244?v=4","gravatar_id":"","url":"https://api.github.com/users/dgriffen","html_url":"https://github.com/dgriffen","followers_url":"https://api.github.com/users/dgriffen/followers","following_url":"https://api.github.com/users/dgriffen/following{/other_user}","gists_url":"https://api.github.com/users/dgriffen/gists{/gist_id}","starred_url":"https://api.github.com/users/dgriffen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgriffen/subscriptions","organizations_url":"https://api.github.com/users/dgriffen/orgs","repos_url":"https://api.github.com/users/dgriffen/repos","events_url":"https://api.github.com/users/dgriffen/events{/privacy}","received_events_url":"https://api.github.com/users/dgriffen/received_events","type":"User","site_admin":false},"created_at":"2018-02-14T20:23:01Z","updated_at":"2018-02-14T20:23:01Z","author_association":"CONTRIBUTOR","body":"I think this should be reopened. This still appears as an issue for me with version 3.1. It also seems to happen with SystemJS as well and doesn't matter if I compile to CommonJs modules, AMD or SystemJS modules. In all cases my compiled js code is handed an `xterm_1` object that it expects to have a `.Terminal` property representing the terminal constructor. Instead the `xterm_1` object is the `Terminal` object."}}
{"actor":{"display_login":"dgriffen"}}