{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8745","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8745/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8745/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8745/events","html_url":"https://github.com/Microsoft/TypeScript/issues/8745","id":156188637,"number":8745,"title":"Submodules?","user":{"login":"AlecTaylor","id":212027,"avatar_url":"https://avatars.githubusercontent.com/u/212027?v=3","gravatar_id":"","url":"https://api.github.com/users/AlecTaylor","html_url":"https://github.com/AlecTaylor","followers_url":"https://api.github.com/users/AlecTaylor/followers","following_url":"https://api.github.com/users/AlecTaylor/following{/other_user}","gists_url":"https://api.github.com/users/AlecTaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/AlecTaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlecTaylor/subscriptions","organizations_url":"https://api.github.com/users/AlecTaylor/orgs","repos_url":"https://api.github.com/users/AlecTaylor/repos","events_url":"https://api.github.com/users/AlecTaylor/events{/privacy}","received_events_url":"https://api.github.com/users/AlecTaylor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Question","name":"Question","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-05-23T02:20:00Z","updated_at":"2016-05-23T18:02:35Z","closed_at":null,"body":"<!--\r\nThank you for contributing to TypeScript! Please review this checklist\r\n       before submitting your issue.\r\n[ ] Many common issues and suggestions are addressed in the FAQ\r\n     https://github.com/Microsoft/TypeScript/wiki/FAQ\r\n[ ] Search for duplicates before logging new issues\r\n    https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&q=is%3Aissue\r\n[ ] Questions are best asked and answered at Stack Overflow\r\n    http://stackoverflow.com/questions/tagged/typescript\r\n\r\nFor bug reports, please include the information below.\r\n__________________________________________________________ -->\r\n\r\n**TypeScript Version:** \r\n\r\n1.9.0-dev.20160522-1.0\r\n\r\n**Code**\r\n\r\nHere's what I want to do:\r\n```ts\r\nimport {isEmail} from 'marker.validators'\r\n```\r\n\r\n**Expected behavior:**\r\nFor it to just work\r\n\r\n**Actual behavior:** \r\nSubmodules don't work that way\r\n\r\n---\r\n\r\nSo currently I do this:\r\n\r\n```ts\r\nimport {validators} from 'marker';\r\n\r\nvalidators.isEmail('foo@bar.com');\r\n// I want the `isEmail` symbol, without having to `const isEmail = validators.isEmail`\r\n```\r\n\r\n\r\n#### marker.d.ts\r\n```ts\r\ndeclare var marker: marker.marker;\r\n\r\ndeclare module marker {\r\n    export interface marker {\r\n        validators: IValidators;\r\n    }\r\n\r\n    export interface IValidators {\r\n        isEmail(input: string): boolean;\r\n    }\r\n}\r\n\r\nexport = marker;\r\n```\r\n\r\n#### index.ts\r\n```ts\r\nimport * as vs from './validators'\r\n\r\nexport const validators = vs;\r\n```\r\n\r\n#### validators.ts\r\n```ts\r\nexport function isEmail(input: string): boolean { return true }\r\n```\r\n\r\n---\r\n\r\nHow am I meant to do this, e.g.: `namespace`s?\r\n\r\nBTW: Asked on [StackOverlfow](http://stackoverflow.com/q/37370601) also"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/221047918","html_url":"https://github.com/Microsoft/TypeScript/issues/8745#issuecomment-221047918","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/8745","id":221047918,"user":{"login":"mhegazy","id":8000722,"avatar_url":"https://avatars.githubusercontent.com/u/8000722?v=3","gravatar_id":"","url":"https://api.github.com/users/mhegazy","html_url":"https://github.com/mhegazy","followers_url":"https://api.github.com/users/mhegazy/followers","following_url":"https://api.github.com/users/mhegazy/following{/other_user}","gists_url":"https://api.github.com/users/mhegazy/gists{/gist_id}","starred_url":"https://api.github.com/users/mhegazy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhegazy/subscriptions","organizations_url":"https://api.github.com/users/mhegazy/orgs","repos_url":"https://api.github.com/users/mhegazy/repos","events_url":"https://api.github.com/users/mhegazy/events{/privacy}","received_events_url":"https://api.github.com/users/mhegazy/received_events","type":"User","site_admin":false},"created_at":"2016-05-23T18:02:34Z","updated_at":"2016-05-23T18:02:34Z","body":"Note that the current behavior matches the ES6 module spec, there is no reference to submodules or using dots to destructure module exports."}}
{"actor":{"display_login":"mhegazy"}}