{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1651","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1651/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1651/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1651/events","html_url":"https://github.com/Microsoft/TypeScript/issues/1651","id":54127630,"number":1651,"title":"How do you do a straight TS emit?","user":{"login":"ctaggart","id":80104,"avatar_url":"https://avatars.githubusercontent.com/u/80104?v=3","gravatar_id":"","url":"https://api.github.com/users/ctaggart","html_url":"https://github.com/ctaggart","followers_url":"https://api.github.com/users/ctaggart/followers","following_url":"https://api.github.com/users/ctaggart/following{/other_user}","gists_url":"https://api.github.com/users/ctaggart/gists{/gist_id}","starred_url":"https://api.github.com/users/ctaggart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctaggart/subscriptions","organizations_url":"https://api.github.com/users/ctaggart/orgs","repos_url":"https://api.github.com/users/ctaggart/repos","events_url":"https://api.github.com/users/ctaggart/events{/privacy}","received_events_url":"https://api.github.com/users/ctaggart/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":8,"created_at":"2015-01-13T00:05:34Z","updated_at":"2015-01-15T20:43:43Z","closed_at":null,"body":"I want to be able to programmatically create a TS file and emit it.\r\n\r\n@DanielRosenwasser [mentioned last week](https://github.com/Microsoft/TypeScript/issues/1514#issuecomment-69105512):\r\n\r\n>It honestly may be better to do a straight TS emit if what you're looking for is definition file emit, if you're looking to use it as a verification pass for an intermediate language, or if you're looking to take advantage of our downlevel emit functionality.\r\n\r\nHow do do a `straight TS emit`?\r\n\r\nIn the [Using the Compiler API](https://github.com/Microsoft/TypeScript/wiki/Using-the-Compiler-API) it says:\r\n\r\n> Emitter: Output generated from a set of inputs (.ts and .d.ts) files can be one of: JavaScript (.js), definitions (.d.ts), or source maps (.js.map)\r\n\r\nThat is cool that you can emit a `.d.ts` definition. Is there any way to emit a `.ts` file? Is there anything that can \"pretty print\" a TS AST?"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/70158025","html_url":"https://github.com/Microsoft/TypeScript/issues/1651#issuecomment-70158025","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1651","id":70158025,"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":"2015-01-15T20:43:43Z","updated_at":"2015-01-15T20:43:43Z","body":"thanks @ctaggart  for sharing. i have left a few comments. i am also working on cleaning up the host API so it can be easier to use."}}