{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6723","repository_url":"https://api.github.com/repos/Microsoft/TypeScript","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6723/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6723/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6723/events","html_url":"https://github.com/Microsoft/TypeScript/issues/6723","id":129775713,"number":6723,"title":"Add separate compiler option for generated declarations output directory.","user":{"login":"ylepikhov","id":1898195,"avatar_url":"https://avatars.githubusercontent.com/u/1898195?v=3","gravatar_id":"","url":"https://api.github.com/users/ylepikhov","html_url":"https://github.com/ylepikhov","followers_url":"https://api.github.com/users/ylepikhov/followers","following_url":"https://api.github.com/users/ylepikhov/following{/other_user}","gists_url":"https://api.github.com/users/ylepikhov/gists{/gist_id}","starred_url":"https://api.github.com/users/ylepikhov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ylepikhov/subscriptions","organizations_url":"https://api.github.com/users/ylepikhov/orgs","repos_url":"https://api.github.com/users/ylepikhov/repos","events_url":"https://api.github.com/users/ylepikhov/events{/privacy}","received_events_url":"https://api.github.com/users/ylepikhov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Accepting%20PRs","name":"Accepting PRs","color":"009800"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Effort:%20Easy","name":"Effort: Easy","color":"51bb51"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Suggestion","name":"Suggestion","color":"006b75"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-29T14:09:34Z","updated_at":"2016-02-05T00:26:51Z","closed_at":null,"body":"I need to make an automated building of my typescript projects. Typescript compilation results (i.e .js and .d.ts files) need further separate processing. \r\n\r\nIt would be nice if there is separate compilation option to specify output directory for generated declarations. Something like this:\r\n\r\n```javascript\r\n//tsconfig.json\r\n{\r\n  \"CompilerOptions\": {\r\n    ...\r\n      \"declaration\": true,\r\n      \"declarationDir\": \"target/typings\"\r\n    ...\r\n  }\r\n}```"},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/180121130","html_url":"https://github.com/Microsoft/TypeScript/issues/6723#issuecomment-180121130","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/6723","id":180121130,"user":{"login":"masaeedu","id":3674056,"avatar_url":"https://avatars.githubusercontent.com/u/3674056?v=3","gravatar_id":"","url":"https://api.github.com/users/masaeedu","html_url":"https://github.com/masaeedu","followers_url":"https://api.github.com/users/masaeedu/followers","following_url":"https://api.github.com/users/masaeedu/following{/other_user}","gists_url":"https://api.github.com/users/masaeedu/gists{/gist_id}","starred_url":"https://api.github.com/users/masaeedu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masaeedu/subscriptions","organizations_url":"https://api.github.com/users/masaeedu/orgs","repos_url":"https://api.github.com/users/masaeedu/repos","events_url":"https://api.github.com/users/masaeedu/events{/privacy}","received_events_url":"https://api.github.com/users/masaeedu/received_events","type":"User","site_admin":false},"created_at":"2016-02-05T00:26:51Z","updated_at":"2016-02-05T00:26:51Z","body":"@RyanCavanaugh I think I've narrowed it down to some fooling around that needs to be done here: https://github.com/Microsoft/TypeScript/blob/a324176102b4657b4de6759b5d03f5eeda38f422/src/compiler/utilities.ts#L2070. Some questions though...\r\n\r\nWhat organization should be followed inside the declarations folder? Do I just remove the `.js` from a file, snip the path relative to the `outDir` or project root (whichever comes first), and plant that relative to the `declarationDir`?\r\n\r\nAlso, how would I write a test to check where declaration files end up?"}}