{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11059","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11059/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11059/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/11059/events","html_url":"https://github.com/Microsoft/TypeScript/issues/11059","id":178621138,"number":11059,"title":"export default after missing closing curly brace throws an error in typescript compiler","user":{"login":"G0A","id":3006913,"avatar_url":"https://avatars.githubusercontent.com/u/3006913?v=3","gravatar_id":"","url":"https://api.github.com/users/G0A","html_url":"https://github.com/G0A","followers_url":"https://api.github.com/users/G0A/followers","following_url":"https://api.github.com/users/G0A/following{/other_user}","gists_url":"https://api.github.com/users/G0A/gists{/gist_id}","starred_url":"https://api.github.com/users/G0A/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/G0A/subscriptions","organizations_url":"https://api.github.com/users/G0A/orgs","repos_url":"https://api.github.com/users/G0A/repos","events_url":"https://api.github.com/users/G0A/events{/privacy}","received_events_url":"https://api.github.com/users/G0A/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-22T14:11:37Z","updated_at":"2016-09-22T14:11:37Z","closed_at":null,"body":"**TypeScript Version:**  1.8.10 / Version 2.1.0-dev.20160922\r\n\r\n**Code**\r\n\r\n```ts\r\nconst foo = () => {\r\n    if (0) {\r\n        return;\r\n\r\n};\r\n\r\nconst bar = 'bar';\r\n\r\nexport default bar;\r\n\r\n```\r\n\r\n**Expected behavior:**\r\n\r\ntserror.ts(10,20): error TS1005: '}' expected.\r\n\r\n**Actual behavior:** \r\n\r\ntserror.ts(10,20): error TS1005: '}' expected.\r\nc:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:33078\r\n                throw e;\r\n                ^\r\n\r\nTypeError: Cannot read property 'export=' of undefined\r\n    at checkExternalModuleExports (c:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:22882:62)\r\n    at checkExportAssignment (c:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:22860:13)\r\n    at checkSourceElement (c:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:23022:28)\r\n    at Object.forEach (c:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:98:30)\r\n    at checkBlock (c:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:21370:16)\r\n    at checkSourceElement (c:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:22969:28)\r\n    at checkFunctionExpressionOrObjectLiteralMethodDeferred (c:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:19787:21)\r\n    at checkDeferredNodes (c:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:23046:25)\r\n    at checkSourceFileWorker (c:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:23075:17)\r\n    at checkSourceFile (c:\\npm-global\\node_modules\\typescript\\lib\\tsc.js:23060:13)\r\n\r\n"}}
{"actor":{"display_login":"G0A"}}