title: Enums in typescript d.ts file
body: <p>I'm new to Typescript and I'm using it in a create-react-project. I have a folder called /typings which my tsconfig.json file points to and so far I've put all my type declarations in an <strong>index.d.ts</strong> file in that folder.</p>
  
  <p>So far so good. "type" and "interface" declarations seem to be available in all parts of my project. I'm not explicitly exporting them from the <strong>index.d.ts</strong> file and not importing them into any other file.</p>
  
  <p>The problem comes when I declare the following...</p>
  
  <pre><code>enum Gender {male, female}
  </code></pre>
  
  <p>When I try to use the enum in a different file I get the error... </p>
  
  <pre><code>Ambient const enums are not allowed when the '--isolatedModules' flag is provided
  </code></pre>
  
  <p>I have read other answers on SO which say you should declare the enum as a const but that doesn't help. I've also seen the suggestion that you should <strong>"export defualt undefined"</strong> at the bottom of the file but when I do that none of the other types are available in the rest of the project.</p>
  
  <p>Lastly, I have tried changing my compiler options to set <strong>"isolatedModules": false</strong> but it automatically gets switched back to true when compiling. Apparently create-react-app will always do thi.</p>
  
  <p>What should I do to allow enums declared in my index.d.ts file to be available to use in the rest of my project automatically?</p>