{"action":"opened","issue":{"url":"https://api.github.com/repos/denoland/deno/issues/862","repository_url":"https://api.github.com/repos/denoland/deno","labels_url":"https://api.github.com/repos/denoland/deno/issues/862/labels{/name}","comments_url":"https://api.github.com/repos/denoland/deno/issues/862/comments","events_url":"https://api.github.com/repos/denoland/deno/issues/862/events","html_url":"https://github.com/denoland/deno/issues/862","id":365107850,"node_id":"MDU6SXNzdWUzNjUxMDc4NTA=","number":862,"title":"Consider resolving external JavaScript as \"typeless\" and assumed AMD/UMD","user":{"login":"kitsonk","id":1282577,"node_id":"MDQ6VXNlcjEyODI1Nzc=","avatar_url":"https://avatars0.githubusercontent.com/u/1282577?v=4","gravatar_id":"","url":"https://api.github.com/users/kitsonk","html_url":"https://github.com/kitsonk","followers_url":"https://api.github.com/users/kitsonk/followers","following_url":"https://api.github.com/users/kitsonk/following{/other_user}","gists_url":"https://api.github.com/users/kitsonk/gists{/gist_id}","starred_url":"https://api.github.com/users/kitsonk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kitsonk/subscriptions","organizations_url":"https://api.github.com/users/kitsonk/orgs","repos_url":"https://api.github.com/users/kitsonk/repos","events_url":"https://api.github.com/users/kitsonk/events{/privacy}","received_events_url":"https://api.github.com/users/kitsonk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-29T07:41:03Z","updated_at":"2018-09-29T07:41:03Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Importing existing external JavaScript, especially either UMD or AMD bundles, could provide exports to deno just fine, but currently deno _barfs_ on these files with things like:\r\n\r\n```\r\nerror TS1192: Module '\"some/module.js\"' has no default export.\r\n```\r\n\r\nFor files that the resolved module specifier is `.js` we could just inform TypeScript the module is an \"any\" module and go ahead and run the module through an environment with `define()` to collect any module factories and make the exports available.\r\n\r\nThis should mean that any UMD modules, or AMD bundles should _just work_.  The `define()` though will provide a module specifier, which deno would have to track and resolve and return when required/imported.\r\n\r\nGlobal scripts would just execute, but not return any exports, and CommonJS modules would throw."}}
{"actor":{"display_login":"kitsonk"}}