title: React Typescript Type Cast Issue - Parsing Error: Missing Semicolon
body: <p>I have this simple line of code:</p>
  <pre class="lang-js prettyprint-override"><code>const target = e.target as HTMLLIElement;
  </code></pre>
  <p>and I am getting this error:</p>
  <pre><code>  Line 18:28:  Parsing error: Missing semicolon
  &gt; 18 |     const target = e.target as HTMLLIElement;
       |                            ^
  </code></pre>
  <p>I've looked at dozens of different posts that are similar to my issue but none of them match up just right to my problem or they have solutions that don't really pertain to my project. For example, some have run into eslint issues, but I don't have the eslint package installed. Here is my <code>package.json</code> file:</p>
  <pre><code>{
    &quot;name&quot;: &quot;ally-autobot&quot;,
    &quot;version&quot;: &quot;0.1.0&quot;,
    &quot;private&quot;: true,
    &quot;dependencies&quot;: {
      &quot;@craco/craco&quot;: &quot;^6.1.1&quot;,
      &quot;@reduxjs/toolkit&quot;: &quot;^1.5.1&quot;,
      &quot;@tailwindcss/postcss7-compat&quot;: &quot;^2.1.0&quot;,
      &quot;@testing-library/jest-dom&quot;: &quot;^4.2.4&quot;,
      &quot;@testing-library/react&quot;: &quot;^9.3.2&quot;,
      &quot;@testing-library/user-event&quot;: &quot;^7.1.2&quot;,
      &quot;@types/jest&quot;: &quot;^24.0.0&quot;,
      &quot;@types/lodash&quot;: &quot;^4.14.168&quot;,
      &quot;@types/node&quot;: &quot;^12.0.0&quot;,
      &quot;@types/react&quot;: &quot;^16.9.0&quot;,
      &quot;@types/react-dom&quot;: &quot;^16.9.0&quot;,
      &quot;@types/react-redux&quot;: &quot;^7.1.7&quot;,
      &quot;@types/react-router-dom&quot;: &quot;^5.1.7&quot;,
      &quot;autoprefixer&quot;: &quot;^9&quot;,
      &quot;firebase&quot;: &quot;^8.4.2&quot;,
      &quot;firebase-tools&quot;: &quot;^9.10.0&quot;,
      &quot;lint&quot;: &quot;^0.7.0&quot;,
      &quot;lodash-core&quot;: &quot;^4.17.19&quot;,
      &quot;postcss&quot;: &quot;^7&quot;,
      &quot;react&quot;: &quot;^17.0.2&quot;,
      &quot;react-dom&quot;: &quot;^17.0.2&quot;,
      &quot;react-firebase-hooks&quot;: &quot;^3.0.4&quot;,
      &quot;react-redux&quot;: &quot;^7.2.0&quot;,
      &quot;react-router&quot;: &quot;^5.2.0&quot;,
      &quot;react-router-dom&quot;: &quot;^5.2.0&quot;,
      &quot;react-scripts&quot;: &quot;4.0.3&quot;,
      &quot;redux-persist&quot;: &quot;^6.0.0&quot;,
      &quot;source-map-loader&quot;: &quot;^2.0.1&quot;,
      &quot;tailwindcss&quot;: &quot;npm:@tailwindcss/postcss7-compat&quot;,
      &quot;typescript&quot;: &quot;~4.1.5&quot;
    },
    &quot;scripts&quot;: {
      &quot;start&quot;: &quot;craco start&quot;,
      &quot;build&quot;: &quot;craco build&quot;,
      &quot;test&quot;: &quot;craco test&quot;,
      &quot;eject&quot;: &quot;react-scripts eject&quot;
    },
    &quot;browserslist&quot;: {
      &quot;production&quot;: [
        &quot;&gt;0.2%&quot;,
        &quot;not dead&quot;,
        &quot;not op_mini all&quot;
      ],
      &quot;development&quot;: [
        &quot;last 1 chrome version&quot;,
        &quot;last 1 firefox version&quot;,
        &quot;last 1 safari version&quot;
      ]
    }
  }
  </code></pre>
  <p>And here is my <code>tsconfig.json</code> file:</p>
  <pre><code>{
    &quot;compilerOptions&quot;: {
      &quot;sourceMap&quot;: true,
      &quot;incremental&quot;: true,
      &quot;target&quot;: &quot;es5&quot;,
      &quot;module&quot;: &quot;esnext&quot;,
      &quot;strict&quot;: true,
      &quot;noImplicitAny&quot;: true,
      &quot;strictNullChecks&quot;: true,
      &quot;esModuleInterop&quot;: true,
      &quot;forceConsistentCasingInFileNames&quot;: true,
      &quot;lib&quot;: [
        &quot;dom&quot;,
        &quot;dom.iterable&quot;,
        &quot;esnext&quot;
      ],
      &quot;allowJs&quot;: true,
      &quot;skipLibCheck&quot;: true,
      &quot;allowSyntheticDefaultImports&quot;: true,
      &quot;noFallthroughCasesInSwitch&quot;: true,
      &quot;moduleResolution&quot;: &quot;node&quot;,
      &quot;resolveJsonModule&quot;: true,
      &quot;isolatedModules&quot;: true,
      &quot;noEmit&quot;: true,
      &quot;jsx&quot;: &quot;react&quot;
    },
    &quot;include&quot;: [
      &quot;src&quot;
    ]
  }
  </code></pre>
  <p>I've also tried using the angle bracket approach but that doesn't work because I'm in a tsx file. I've tried setting the noImplicitAny to false. I've tried adding semicolons to all expressions in the same file as this error.</p>
  <p>Any thoughts on how to resolve this issue?</p>