title: Import Typescript modules in Svelte Component
body: <p>I have setup <code>svelte-preprocess</code> so I can do this successfully:</p>
  
  <pre><code>&lt;script lang="typescript"&gt;
      let someConstant:string = "some constant";
      console.log({someConstant});
  &lt;/script&gt;
  </code></pre>
  
  <p>That works.  But I don't know how to externalise that constant.  If I try:</p>
  
  <pre><code>&lt;script lang="typescript"&gt;
      import {someConstant} from './SomeTypescript.ts'
      console.log({someConstant});
  &lt;/script&gt;    
  </code></pre>
  
  <p>I get this error message:</p>
  
  <p><code>error TS2691: An import path cannot end with a '.ts' extension. Consider importing './SomeTypescript' instead.</code></p>
  
  <p>When I change it to </p>
  
  <pre><code>&lt;script lang="typescript"&gt;
      import {someConstant} from './SomeTypescript'
      console.log({someConstant});
  &lt;/script&gt;
  </code></pre>
  
  <p>I get this error:</p>
  
  <p><code>Error: Could not resolve './SomeTypescript' from src/tom/ManageAirtableModels.svelte</code></p>
  
  <p>Whats the right way to do this?</p>