title: Sveltekit Typescript parse error when importing types
body: <p>I have this very simple component in a brand new Sveltekit project:</p>
  <pre class="lang-js prettyprint-override"><code>&lt;script context=&quot;module&quot; lang=&quot;ts&quot;&gt;
      import type { Load } from '@sveltejs/kit';
      export const load: Load = ({ url }) =&gt; {
      const company = url.searchParams.get('company');
      return {
        props: {
          company
        }
      };
    }
     
    &lt;/script&gt;
  &lt;script type=&quot;ts&quot;&gt;
          export let company: string;
  
  &lt;/script&gt;
  
  &lt;h1&gt;{company}&lt;/h1&gt;
  </code></pre>
  <p>However, I always get an error at the import line:
  <a href="https://i.stack.imgur.com/rPRvi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rPRvi.png" alt="parse error" /></a></p>
  <p>This also happens when I run the app outside VSCode, so it's not just a problem with the IDE.</p>
  <p>My package.json:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;name&quot;: &quot;testapp&quot;,
      &quot;version&quot;: &quot;0.0.1&quot;,
      &quot;scripts&quot;: {
          &quot;dev&quot;: &quot;svelte-kit dev&quot;,
          &quot;build&quot;: &quot;svelte-kit build&quot;,
          &quot;package&quot;: &quot;svelte-kit package&quot;,
          &quot;preview&quot;: &quot;svelte-kit preview&quot;,
          &quot;prepare&quot;: &quot;svelte-kit sync&quot;,
          &quot;check&quot;: &quot;svelte-check --tsconfig ./tsconfig.json&quot;,
          &quot;check:watch&quot;: &quot;svelte-check --tsconfig ./tsconfig.json --watch&quot;,
          &quot;lint&quot;: &quot;prettier --check --plugin-search-dir=. . &amp;&amp; eslint .&quot;,
          &quot;format&quot;: &quot;prettier --write --plugin-search-dir=. .&quot;
      },
      &quot;devDependencies&quot;: {
          &quot;@sveltejs/adapter-static&quot;: &quot;^1.0.0-next.34&quot;,
          &quot;@sveltejs/kit&quot;: &quot;next&quot;,
          &quot;@typescript-eslint/eslint-plugin&quot;: &quot;^5.27.0&quot;,
          &quot;@typescript-eslint/parser&quot;: &quot;^5.27.0&quot;,
          &quot;eslint&quot;: &quot;^8.16.0&quot;,
          &quot;eslint-config-prettier&quot;: &quot;^8.3.0&quot;,
          &quot;eslint-plugin-svelte3&quot;: &quot;^4.0.0&quot;,
          &quot;prettier&quot;: &quot;^2.6.2&quot;,
          &quot;prettier-plugin-svelte&quot;: &quot;^2.7.0&quot;,
          &quot;svelte&quot;: &quot;^3.44.0&quot;,
          &quot;svelte-check&quot;: &quot;^2.7.1&quot;,
          &quot;svelte-preprocess&quot;: &quot;^4.10.6&quot;,
          &quot;tslib&quot;: &quot;^2.3.1&quot;,
          &quot;typescript&quot;: &quot;^4.7.2&quot;
      },
      &quot;type&quot;: &quot;module&quot;
  }
  </code></pre>
  <p>Does anybody have an idea what's going wrong here?</p>