title: TypeScript's string enums - "Type ... is not assignable to type ..."
body: <p>I have recently upgraded the version of TypeScript from 2.3.4 to 2.4.0 hoping to use the <a href="https://blogs.msdn.microsoft.com/typescript/2017/06/27/announcing-typescript-2-4/" rel="noreferrer">string enums</a>. To my dismay, however, I have been greeted with the error messages:</p>
  
  <blockquote>
  <pre><code>Severity  Code    Description Project File    Line    Suppression State
  Error TS2322  Type '"E"' is not assignable to type
  'StepType'.   ClientApp (tsconfig
  project)  Z:\SMART\Smart\Smart\ClientApp\app\models\process.model.ts  17  Active
  Error TS2322  Type '"S"' is not assignable to type
  'StepType'.   ClientApp (tsconfig
  project)  Z:\SMART\Smart\Smart\ClientApp\app\models\process.model.ts  14  Active
  Error TS2322  Type '"A"' is not assignable to type
  'StepType'.   ClientApp (tsconfig
  project)  Z:\SMART\Smart\Smart\ClientApp\app\models\process.model.ts  15  Active
  Error TS2322  Type '"D"' is not assignable to type
  'StepType'.   ClientApp (tsconfig
  project)  Z:\SMART\Smart\Smart\ClientApp\app\models\process.model.ts  16  Active
  </code></pre>
  </blockquote>
  
  <p>The error messages apply to the following code snippet (with the line numbers):</p>
  
  <pre><code>13. export enum StepType {
  14.    Start = 'S',
  15.    Activity = 'A',
  16.    Decision = 'D',
  17.    End = 'E'
  18. }
  </code></pre>
  
  <p>I am using Visual Studio 2017 which claims TypeScript 2.4.0 is installed:</p>
  
  <p><a href="https://i.stack.imgur.com/TxvMn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TxvMn.png" alt="enter image description here"></a></p>
  
  <p>I searched through <a href="https://github.com/Microsoft/TypeScript/issues" rel="noreferrer">TypeScript's issues</a>, but without luck. Does anybody know how to fix it?</p>