{"action":"created","issue":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/1898","repository_url":"https://api.github.com/repos/jspm/jspm-cli","labels_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1898/labels{/name}","comments_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1898/comments","events_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1898/events","html_url":"https://github.com/jspm/jspm-cli/issues/1898","id":159584859,"number":1898,"title":"0.17.0-beta.17: TypeScript with AMD and globals","user":{"login":"OliverJAsh","id":921609,"avatar_url":"https://avatars.githubusercontent.com/u/921609?v=3","gravatar_id":"","url":"https://api.github.com/users/OliverJAsh","html_url":"https://github.com/OliverJAsh","followers_url":"https://api.github.com/users/OliverJAsh/followers","following_url":"https://api.github.com/users/OliverJAsh/following{/other_user}","gists_url":"https://api.github.com/users/OliverJAsh/gists{/gist_id}","starred_url":"https://api.github.com/users/OliverJAsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OliverJAsh/subscriptions","organizations_url":"https://api.github.com/users/OliverJAsh/orgs","repos_url":"https://api.github.com/users/OliverJAsh/repos","events_url":"https://api.github.com/users/OliverJAsh/events{/privacy}","received_events_url":"https://api.github.com/users/OliverJAsh/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-10T08:32:21Z","updated_at":"2016-06-10T10:15:59Z","closed_at":"2016-06-10T10:15:59Z","body":"I want to use jspm to write a TypeScript application which consists of ES6, AMD, and globals.\r\n\r\nWhen loading from the bundle, SystemJS throws an error:\r\n\r\n``` ts\r\nimport es6 from './es6.ts';\r\nimport amd from './amd.ts';\r\nimport global from './global.ts';\r\n\r\nconsole.log(es6, amd, global);\r\n```\r\n\r\n```\r\nUncaught (in promise) Error: ReferenceError: define is not defined(…)\r\n```\r\n\r\nHere is my project: https://gist.github.com/OliverJAsh/a1d5e9feb6b0d8ccaae51ac77ab290f4\r\n\r\nIt appears that the bundle process is not detecting the AMD module in `amd.ts`:\r\n\r\n``` js\r\nSystem.register(\"module-test/amd.ts\", [], function(exports_1, context_1) {\r\n  \"use strict\";\r\n  var __moduleName = context_1 && context_1.id;\r\n  return {\r\n    setters: [],\r\n    execute: function() {\r\n      define(function() {\r\n        return 'amd';\r\n      });\r\n    }\r\n  };\r\n});\r\n```\r\n\r\nIf I take away the AMD module and try to import a global, I get `undefined` back from the import."},"comment":{"url":"https://api.github.com/repos/jspm/jspm-cli/issues/comments/225146348","html_url":"https://github.com/jspm/jspm-cli/issues/1898#issuecomment-225146348","issue_url":"https://api.github.com/repos/jspm/jspm-cli/issues/1898","id":225146348,"user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T10:15:59Z","updated_at":"2016-06-10T10:15:59Z","body":"Created https://github.com/frankwallis/plugin-typescript/issues/138. Also caught https://github.com/jspm/jspm-cli/commit/229359325cc4d83a3e83841d2c1e4f9adfae0e95 in the process so thanks for that. Let's track at the TypeScript plugin issue."}}
{"actor":{"display_login":"guybedford"}}