{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2923","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2923/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2923/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2923/events","html_url":"https://github.com/Microsoft/TypeScript/pull/2923","id":71149919,"number":2923,"title":"Namespaces","user":{"login":"ahejlsberg","id":4226954,"avatar_url":"https://avatars.githubusercontent.com/u/4226954?v=3","gravatar_id":"","url":"https://api.github.com/users/ahejlsberg","html_url":"https://github.com/ahejlsberg","followers_url":"https://api.github.com/users/ahejlsberg/followers","following_url":"https://api.github.com/users/ahejlsberg/following{/other_user}","gists_url":"https://api.github.com/users/ahejlsberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ahejlsberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahejlsberg/subscriptions","organizations_url":"https://api.github.com/users/ahejlsberg/orgs","repos_url":"https://api.github.com/users/ahejlsberg/repos","events_url":"https://api.github.com/users/ahejlsberg/events{/privacy}","received_events_url":"https://api.github.com/users/ahejlsberg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/cla-not-required","name":"cla-not-required","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-04-27T01:48:04Z","updated_at":"2015-05-18T12:36:45Z","closed_at":"2015-04-29T00:23:49Z","pull_request":{"url":"https://api.github.com/repos/Microsoft/TypeScript/pulls/2923","html_url":"https://github.com/Microsoft/TypeScript/pull/2923","diff_url":"https://github.com/Microsoft/TypeScript/pull/2923.diff","patch_url":"https://github.com/Microsoft/TypeScript/pull/2923.patch"},"body":"To better align with ES6 modules as suggested in #2159, this PR introduces a new `namespace` keyword as the preferred way to declare what was formerly known as \"internal modules\". Our terminology changes as follows:\r\n\r\n* **Internal module** becomes **Namespace**.\r\n* **External module** becomes **Module**.\r\n\r\nFor backwards compatibility, namespaces can still be declared in the old way (using the `module` keyword) and no existing code is broken by this change. We may consider introducing a compiler option that disallows using the `module` keyword to declare namespaces.\r\n\r\nThis PR focuses on the external effects of the change and doesn't change any internal type or flag names in the compiler."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/103044511","html_url":"https://github.com/Microsoft/TypeScript/pull/2923#issuecomment-103044511","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/2923","id":103044511,"user":{"login":"pocesar","id":461084,"avatar_url":"https://avatars.githubusercontent.com/u/461084?v=3","gravatar_id":"","url":"https://api.github.com/users/pocesar","html_url":"https://github.com/pocesar","followers_url":"https://api.github.com/users/pocesar/followers","following_url":"https://api.github.com/users/pocesar/following{/other_user}","gists_url":"https://api.github.com/users/pocesar/gists{/gist_id}","starred_url":"https://api.github.com/users/pocesar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pocesar/subscriptions","organizations_url":"https://api.github.com/users/pocesar/orgs","repos_url":"https://api.github.com/users/pocesar/repos","events_url":"https://api.github.com/users/pocesar/events{/privacy}","received_events_url":"https://api.github.com/users/pocesar/received_events","type":"User","site_admin":false},"created_at":"2015-05-18T12:36:45Z","updated_at":"2015-05-18T12:36:45Z","body":"does the `namespace` create a IIFE that can keep some code private? and can it be nested? I usually use 2 levels of internal modules in Angular to help debugging and measuring memory snapshots. (`(Async.Controller.Main): 18882,2` is much easier to spot than `(anonymous): 18882,2`)"}}