title: TypeScript files in monorepo is with .js extensions so IDE doesn't understand TypeScript in these files
body: <p>I've just cloned <a href="https://github.com/facebook/react" rel="nofollow noreferrer">React monorepo</a> and open the folder as a new project in WebStorm IDE. However, for some reason, all .js files in this repo are actually written in TypeScript so the IDE can't figure out the TypeScript written in these files.</p>
  <p>For example:</p>
  <pre class="lang-js prettyprint-override"><code>//ReactHooks.js
  export function useTransition(): [boolean, (() =&gt; void) =&gt; void] {
                                   ^Type annotations can only be used in TypeScript files.ts(8010) 
    const dispatcher = resolveDispatcher();
    return dispatcher.useTransition();
  }
  </code></pre>
  <p>I've seen it in some repos, but could never understand how these project configured ther IDE's locally to understand that these files are actually ts files.</p>
  <p>I don't know why React team decided to use .js extension for TS files, anyway, how can I configure the IDE to understand that these files are actually TS files?</p>
  <p><em>(there is no webpack.config at the top level, how do React team actually work on this repo this way?)</em></p>
  <p>Looked for solution on the web but couldn't find anything.</p>