<p dir="auto">Since TypeScript 1.4, using the Compile on Save feature, enum members are not being replaced with their literal values in the output js file.</p>
<p dir="auto">The same operation via a full project build inserts the literal value as expected.  This occurs for both regular and const enums.</p>
<p dir="auto">In the linked example project, there is an enum file "Animals.ts" which is being AMD-imported into the class file "Farm.ts".  If you make a minor edit to the Farm.ts file (e.g. insert a space and save), then line 4 of Farm.js shows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="            this.animals = [Animals.Chicken, Animals.Cow, Animals.Sheep];"><pre class="notranslate"><code class="notranslate">            this.animals = [Animals.Chicken, Animals.Cow, Animals.Sheep];
</code></pre></div>
<p dir="auto">Whereas, if you do a project build, the line 4 of Farm.js shows the expected output:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="            this.animals = [3 /* Chicken */, 0 /* Cow */, 1 /* Sheep */];"><pre class="notranslate"><code class="notranslate">            this.animals = [3 /* Chicken */, 0 /* Cow */, 1 /* Sheep */];
</code></pre></div>
<p dir="auto">Example project: <a href="https://www.dropbox.com/s/xc34f0q6rhc0amm/ExampleProject.zip?dl=0" rel="nofollow">https://www.dropbox.com/s/xc34f0q6rhc0amm/ExampleProject.zip?dl=0</a></p>
<p dir="auto">I can confirm that this is happening in both VS2013 + TS1.4 and VS2015 CTP.</p>
<p dir="auto">Hi,<br>
I installed Visual Studio Community 2013 and Typescript 1.4. When I changed all my enums to const enum (btw, very nice feature, thanks!) I noticed that compile-on-save feature doesn't  handle this feature well.</p>
<p dir="auto">When I use those const enums in other file than the one it was defined in then when I save file, they are not resolved to constant numbers.</p>
<p dir="auto">For example I have file firstFile.ts:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const enum TestEnum {
    Foo, Bar
}

var testFirstFile = TestEnum.Bar;"><pre class="notranslate"><code class="notranslate">const enum TestEnum {
    Foo, Bar
}

var testFirstFile = TestEnum.Bar;
</code></pre></div>
<p dir="auto">and when I save file (by pressing Ctrl+S) i get file firstFile.js:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="var testFirstFile = 1 /* Bar */;
//# sourceMappingURL=firstFile.js.map"><pre class="notranslate"><code class="notranslate">var testFirstFile = 1 /* Bar */;
//# sourceMappingURL=firstFile.js.map
</code></pre></div>
<p dir="auto">but When i have secondFile.ts file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;firstfile.ts&quot; /&gt;

var testInOtherFile = TestEnum.Bar;"><pre class="notranslate"><code class="notranslate">/// &lt;reference path="firstfile.ts" /&gt;

var testInOtherFile = TestEnum.Bar;
</code></pre></div>
<p dir="auto">and save file I get secondFile.js:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;firstfile.ts&quot; /&gt;
var testInOtherFile = TestEnum.Bar;
//# sourceMappingURL=secondFile.js.map"><pre class="notranslate"><code class="notranslate">/// &lt;reference path="firstfile.ts" /&gt;
var testInOtherFile = TestEnum.Bar;
//# sourceMappingURL=secondFile.js.map
</code></pre></div>
<p dir="auto">only when I build project in Visual Studio I get proper secondFile.js file:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="/// &lt;reference path=&quot;firstfile.ts&quot; /&gt;
var testInOtherFile = 1 /* Bar */;
//# sourceMappingURL=secondFile.js.map"><pre class="notranslate"><code class="notranslate">/// &lt;reference path="firstfile.ts" /&gt;
var testInOtherFile = 1 /* Bar */;
//# sourceMappingURL=secondFile.js.map
</code></pre></div>