{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11544","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11544/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11544/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11544/events","html_url":"https://github.com/Microsoft/TypeScript/issues/11544","id":182402484,"number":11544,"title":"Import from index.ts may be broken in 2.0.3","user":{"login":"Izhaki","id":880132,"avatar_url":"https://avatars.githubusercontent.com/u/880132?v=3","gravatar_id":"","url":"https://api.github.com/users/Izhaki","html_url":"https://github.com/Izhaki","followers_url":"https://api.github.com/users/Izhaki/followers","following_url":"https://api.github.com/users/Izhaki/following{/other_user}","gists_url":"https://api.github.com/users/Izhaki/gists{/gist_id}","starred_url":"https://api.github.com/users/Izhaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Izhaki/subscriptions","organizations_url":"https://api.github.com/users/Izhaki/orgs","repos_url":"https://api.github.com/users/Izhaki/repos","events_url":"https://api.github.com/users/Izhaki/events{/privacy}","received_events_url":"https://api.github.com/users/Izhaki/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-11T23:50:21Z","updated_at":"2016-10-11T23:50:21Z","closed_at":null,"body":"**TypeScript Version:**  2.0.3\r\n**VSCode Version:**  1.6.0\r\n\r\n**Code**\r\n\r\n```ts\r\nimport { Rectangle } from '../../viewees/shapes';\r\n```\r\n\r\n**Expected behavior:**\r\nRectangle to be defined\r\n\r\n**Actual behavior:** \r\nRectangle is undefined\r\n\r\n----\r\n\r\nMy code based is full of imports using `index.ts`.\r\n\r\nIn the `shapes` folder `index.ts` is:\r\n```ts\r\nexport { Rectangle } from './Rectangle';\r\nexport { Shape     } from './Shape';\r\n```\r\n\r\nI've just upgraded to typescript 2.0.3 - no problems (yet I had to remove quite a few `.ts` from imports).\r\n\r\nBut now when creating a new file and using:\r\n\r\n```ts\r\nimport { Rectangle } from '../../viewees/shapes';\r\n```\r\n\r\nRectangle resolves to `undefined`, whereas\r\n\r\n```ts\r\nimport { Rectangle } from '../../viewees/shapes/Rectangle';\r\n```\r\n\r\nResolves correctly (to a function/class).\r\n\r\n[This SO question](http://stackoverflow.com/q/39962047/1179377) may be related.\r\n\r\n"}}
{"actor":{"display_login":"Izhaki"}}