{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1812","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1812/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1812/comments","events_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1812/events","html_url":"https://github.com/Microsoft/TypeScript/issues/1812","id":55543617,"number":1812,"title":"VS 2013 save and compile output vs build compile output","user":{"login":"craigktreasure","id":6309423,"avatar_url":"https://avatars.githubusercontent.com/u/6309423?v=3","gravatar_id":"","url":"https://api.github.com/users/craigktreasure","html_url":"https://github.com/craigktreasure","followers_url":"https://api.github.com/users/craigktreasure/followers","following_url":"https://api.github.com/users/craigktreasure/following{/other_user}","gists_url":"https://api.github.com/users/craigktreasure/gists{/gist_id}","starred_url":"https://api.github.com/users/craigktreasure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigktreasure/subscriptions","organizations_url":"https://api.github.com/users/craigktreasure/orgs","repos_url":"https://api.github.com/users/craigktreasure/repos","events_url":"https://api.github.com/users/craigktreasure/events{/privacy}","received_events_url":"https://api.github.com/users/craigktreasure/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Bug","name":"Bug","color":"e11d21"},{"url":"https://api.github.com/repos/Microsoft/TypeScript/labels/Fixed","name":"Fixed","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":{"login":"vladima","id":8052307,"avatar_url":"https://avatars.githubusercontent.com/u/8052307?v=3","gravatar_id":"","url":"https://api.github.com/users/vladima","html_url":"https://github.com/vladima","followers_url":"https://api.github.com/users/vladima/followers","following_url":"https://api.github.com/users/vladima/following{/other_user}","gists_url":"https://api.github.com/users/vladima/gists{/gist_id}","starred_url":"https://api.github.com/users/vladima/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vladima/subscriptions","organizations_url":"https://api.github.com/users/vladima/orgs","repos_url":"https://api.github.com/users/vladima/repos","events_url":"https://api.github.com/users/vladima/events{/privacy}","received_events_url":"https://api.github.com/users/vladima/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/7","html_url":"https://github.com/Microsoft/TypeScript/milestones/TypeScript%201.5","labels_url":"https://api.github.com/repos/Microsoft/TypeScript/milestones/7/labels","id":874650,"number":7,"title":"TypeScript 1.5","description":"","creator":{"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},"open_issues":0,"closed_issues":256,"state":"closed","created_at":"2014-11-20T18:06:13Z","updated_at":"2015-05-18T18:03:55Z","due_on":null,"closed_at":"2015-05-05T05:59:35Z"},"comments":50,"created_at":"2015-01-26T21:57:51Z","updated_at":"2015-05-21T10:46:33Z","closed_at":"2015-02-05T18:22:40Z","body":"I have an enum in an interface that, when used in my TS code in TypeScript 1.3, was output as a constant. This is no longer the case in 1.4 after saving my file. When i build the project, the enum code is properly output as a constant. Using VS 2013 update 4 with TypeScript 1.4 installed.\r\n\r\nEnum declaration file (Colors.d.ts):\r\n```\r\ndeclare module server {\r\n    enum Colors {\r\n        Red = 0,\r\n        Green = 0,\r\n        Blue = 0\r\n    }\r\n}\r\n```\r\nTS Code:\r\n```\r\nif(box.color === server.Colors.Red) {\r\n...\r\n}\r\n```\r\n\r\nJS Output after save:\r\n```\r\nif(box.color === server.Colors.Red) {\r\n...\r\n}\r\n```\r\n\r\nJS Output after build (correct, or what i consider to be correct since there is no implementation of the enum):\r\n```\r\nif(box.color === 0 /* Red */) {\r\n...\r\n}\r\n```\r\n\r\nThe same is observed if the enum is declared using the new \"const enum\" feature."},"comment":{"url":"https://api.github.com/repos/Microsoft/TypeScript/issues/comments/104222985","html_url":"https://github.com/Microsoft/TypeScript/issues/1812#issuecomment-104222985","issue_url":"https://api.github.com/repos/Microsoft/TypeScript/issues/1812","id":104222985,"user":{"login":"vytautas-pranskunas-","id":3918999,"avatar_url":"https://avatars.githubusercontent.com/u/3918999?v=3","gravatar_id":"","url":"https://api.github.com/users/vytautas-pranskunas-","html_url":"https://github.com/vytautas-pranskunas-","followers_url":"https://api.github.com/users/vytautas-pranskunas-/followers","following_url":"https://api.github.com/users/vytautas-pranskunas-/following{/other_user}","gists_url":"https://api.github.com/users/vytautas-pranskunas-/gists{/gist_id}","starred_url":"https://api.github.com/users/vytautas-pranskunas-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vytautas-pranskunas-/subscriptions","organizations_url":"https://api.github.com/users/vytautas-pranskunas-/orgs","repos_url":"https://api.github.com/users/vytautas-pranskunas-/repos","events_url":"https://api.github.com/users/vytautas-pranskunas-/events{/privacy}","received_events_url":"https://api.github.com/users/vytautas-pranskunas-/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T10:46:33Z","updated_at":"2015-05-21T10:46:33Z","body":"Hello again :)\r\n\r\nWe were still trying to fix that enum issue with cooworkers. \r\nThose examples you did while trying to reproduce it - did you put enums to .d.ts file? Because while trying to fix it we noticed that enums placed in .ts files generates as expected but enums placed in defentition files generates:\r\n1) On build - as expected (TestEnum.One = 1 turns to 1)\r\n2) On save - wrong (TestEnum.One = 1 turns to TestEnum.One)\r\n\r\nCan you try to put enums in definition file and use it other file's class and then do compile on save."}}