{"action":"closed","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/7544","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/7544/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/7544/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/7544/events","html_url":"https://github.com/Microsoft/TypeScript/issues/7544","id":141308687,"number":7544,"title":"Error 'cannot be named' when using an exported union-type declaration","user":{"login":"johan-gorter","id":3057773,"avatar_url":"https://avatars.githubusercontent.com/u/3057773?v=3","gravatar_id":"","url":"https://api.github.com/users/johan-gorter","html_url":"https://github.com/johan-gorter","followers_url":"https://api.github.com/users/johan-gorter/followers","following_url":"https://api.github.com/users/johan-gorter/following{/other_user}","gists_url":"https://api.github.com/users/johan-gorter/gists{/gist_id}","starred_url":"https://api.github.com/users/johan-gorter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johan-gorter/subscriptions","organizations_url":"https://api.github.com/users/johan-gorter/orgs","repos_url":"https://api.github.com/users/johan-gorter/repos","events_url":"https://api.github.com/users/johan-gorter/events{/privacy}","received_events_url":"https://api.github.com/users/johan-gorter/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/By%20Design","name":"By Design","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-16T15:26:52Z","updated_at":"2016-03-16T16:43:00Z","closed_at":"2016-03-16T16:43:00Z","body":"TypeScript Version: 1.8.7\r\n\r\nfile1:\r\n```ts\r\nexport interface I1 {\r\n  foo: string;\r\n}\r\n\r\nexport interface I2 {\r\n  bar: number;\r\n}\r\n\r\nexport type I = I1 | I2;\r\n```\r\n\r\nfile2:\r\n```ts\r\nimport {I} from './file1';\r\n\r\nexport let createI = (): I => {\r\n  return undefined;\r\n};\r\n```\r\n\r\nCompile these files with declarations using \r\n```\r\ntsc --init\r\ntsc -d\r\n```\r\n**Expected behavior:**\r\nJavascript and .d.ts files are generated\r\n**Actual behavior:** \r\nAn error is thrown: `error TS4023: Exported variable 'createI' has or is using name 'I1' from external module \"file1\" but cannot be named.`"}}