{"action":"opened","issue":{"url":"https://api.github.com/repos/palantir/tslint/issues/884","labels_url":"https://api.github.com/repos/palantir/tslint/issues/884/labels{/name}","comments_url":"https://api.github.com/repos/palantir/tslint/issues/884/comments","events_url":"https://api.github.com/repos/palantir/tslint/issues/884/events","html_url":"https://github.com/palantir/tslint/issues/884","id":122783512,"number":884,"title":"class extended by namespace — variable used before declaration","user":{"login":"Avol-V","id":7325152,"avatar_url":"https://avatars.githubusercontent.com/u/7325152?v=3","gravatar_id":"","url":"https://api.github.com/users/Avol-V","html_url":"https://github.com/Avol-V","followers_url":"https://api.github.com/users/Avol-V/followers","following_url":"https://api.github.com/users/Avol-V/following{/other_user}","gists_url":"https://api.github.com/users/Avol-V/gists{/gist_id}","starred_url":"https://api.github.com/users/Avol-V/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Avol-V/subscriptions","organizations_url":"https://api.github.com/users/Avol-V/orgs","repos_url":"https://api.github.com/users/Avol-V/repos","events_url":"https://api.github.com/users/Avol-V/events{/privacy}","received_events_url":"https://api.github.com/users/Avol-V/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-17T17:30:39Z","updated_at":"2015-12-17T17:30:39Z","closed_at":null,"body":"In TypeScript we can merge namespaces with classes, and class declaration must be before namespace declaration, but tslint gives an error:\r\n```typescript\r\nclass Test\r\n{\r\n\tpublic method(): void\r\n\t{\r\n\t\tconsole.log( Test.TEST_CONST ); // variable used before declaration\r\n\t}\r\n}\r\nnamespace Test\r\n{\r\n\texport const TEST_CONST: number = 1;\r\n}\r\n```"}}