{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6656","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6656/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6656/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6656/events","html_url":"https://github.com/Microsoft/TypeScript/issues/6656","id":129224913,"number":6656,"title":"Typescript doesnt allow creating module definitions for certain types of ES6 imports","user":{"login":"pdeva","id":3190176,"avatar_url":"https://avatars.githubusercontent.com/u/3190176?v=3","gravatar_id":"","url":"https://api.github.com/users/pdeva","html_url":"https://github.com/pdeva","followers_url":"https://api.github.com/users/pdeva/followers","following_url":"https://api.github.com/users/pdeva/following{/other_user}","gists_url":"https://api.github.com/users/pdeva/gists{/gist_id}","starred_url":"https://api.github.com/users/pdeva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdeva/subscriptions","organizations_url":"https://api.github.com/users/pdeva/orgs","repos_url":"https://api.github.com/users/pdeva/repos","events_url":"https://api.github.com/users/pdeva/events{/privacy}","received_events_url":"https://api.github.com/users/pdeva/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-27T18:11:45Z","updated_at":"2016-01-27T21:22:38Z","closed_at":null,"body":"There is a library I use, `'react-bootstrap-switch'`, that needs to be imported the following way in TypeScript:\r\n\r\n```\r\nimport * as Switch from 'react-bootstrap-switch';\r\n\r\nrender () {\r\n return <Switch/>\r\n}\r\n```\r\n\r\n\r\nIt seems currently TypeScript doesnt allow creating a module definition for a library that exports like this.\r\n\r\nIf I do this:\r\n\r\n```\r\ndeclare module 'react-bootstrap-switch'\r\n{\r\n    import React = require(\"react\");\r\n    class Switch extends React.Component<{onColor?:string},{} >\r\n    {}\r\n\r\n    export  = Switch;\r\n}\r\n```\r\n\r\nIt results in this error:\r\n\r\n```\r\nerror TS2497: Module ''react-bootstrap-switch'' resolves to a non-module entity and cannot be imported using this construct.\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/175859741","html_url":"https://github.com/Microsoft/TypeScript/issues/6656#issuecomment-175859741","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6656","id":175859741,"user":{"login":"pdeva","id":3190176,"avatar_url":"https://avatars.githubusercontent.com/u/3190176?v=3","gravatar_id":"","url":"https://api.github.com/users/pdeva","html_url":"https://github.com/pdeva","followers_url":"https://api.github.com/users/pdeva/followers","following_url":"https://api.github.com/users/pdeva/following{/other_user}","gists_url":"https://api.github.com/users/pdeva/gists{/gist_id}","starred_url":"https://api.github.com/users/pdeva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdeva/subscriptions","organizations_url":"https://api.github.com/users/pdeva/orgs","repos_url":"https://api.github.com/users/pdeva/repos","events_url":"https://api.github.com/users/pdeva/events{/privacy}","received_events_url":"https://api.github.com/users/pdeva/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T21:22:38Z","updated_at":"2016-01-27T21:22:38Z","body":"we want to have 100% ES6 code."}}