{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/10544","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/10544/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/10544/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/10544/events","html_url":"https://github.com/Microsoft/TypeScript/issues/10544","id":173308540,"number":10544,"title":"If merging a class and namespace, the class can't reference types in the namespace","user":{"login":"tomdale","id":90888,"avatar_url":"https://avatars.githubusercontent.com/u/90888?v=3","gravatar_id":"","url":"https://api.github.com/users/tomdale","html_url":"https://github.com/tomdale","followers_url":"https://api.github.com/users/tomdale/followers","following_url":"https://api.github.com/users/tomdale/following{/other_user}","gists_url":"https://api.github.com/users/tomdale/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdale/subscriptions","organizations_url":"https://api.github.com/users/tomdale/orgs","repos_url":"https://api.github.com/users/tomdale/repos","events_url":"https://api.github.com/users/tomdale/events{/privacy}","received_events_url":"https://api.github.com/users/tomdale/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Needs%20More%20Info","name":"Needs More Info","color":"556b75"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-08-25T20:58:00Z","updated_at":"2016-08-25T21:32:47Z","closed_at":null,"body":"**TypeScript Version:**  nightly (Version 2.1.0-dev.20160825)\r\n\r\n**Code**\r\n\r\n```ts\r\nclass Logger {\r\n  public logLevel = Logger.LogLevel.Info;\r\n}\r\n\r\nnamespace Logger {\r\n  export enum LogLevel {\r\n    Verbose,\r\n    Info\r\n  }\r\n}\r\n\r\nexport default Logger;\r\n```\r\n\r\nNote that this error only seems to occur when `--declaration` is passed to `tsc`.\r\n\r\n**Expected behavior:**\r\n\r\nTypeScript should treat the merged class and namespace as a single entity.\r\n\r\n**Actual behavior:** \r\n\r\nTypeScript complains that the class references a type in the namespace:\r\n\r\n> error TS4031: Public property 'logLevel' of exported class has or is using private name 'default.LogLevel'."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/242548031","html_url":"https://github.com/Microsoft/TypeScript/issues/10544#issuecomment-242548031","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/10544","id":242548031,"user":{"login":"tomdale","id":90888,"avatar_url":"https://avatars.githubusercontent.com/u/90888?v=3","gravatar_id":"","url":"https://api.github.com/users/tomdale","html_url":"https://github.com/tomdale","followers_url":"https://api.github.com/users/tomdale/followers","following_url":"https://api.github.com/users/tomdale/following{/other_user}","gists_url":"https://api.github.com/users/tomdale/gists{/gist_id}","starred_url":"https://api.github.com/users/tomdale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomdale/subscriptions","organizations_url":"https://api.github.com/users/tomdale/orgs","repos_url":"https://api.github.com/users/tomdale/repos","events_url":"https://api.github.com/users/tomdale/events{/privacy}","received_events_url":"https://api.github.com/users/tomdale/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T21:32:47Z","updated_at":"2016-08-25T21:32:47Z","body":"Also, if there is a workaround to this, I'd love to know—it's blockingish me on some stuff I'm working on."}}
{"actor":{"display_login":"tomdale"}}