title: Rollup says "[name] is not exported by [file]" while it clearly is
body: <p>I am building a Svelte/TypeScript application and all of a sudden it won't compile anymore, with the following error:</p>
  <pre><code>[!] Error: 'VoidPromiseCallback' is not exported by src/types.ts, imported by src/TopicEditionFormStack/TopicEditionFormStack.svelte
  https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
  src/TopicEditionFormStack/TopicEditionFormStack.svelte (2:18)
  1: &lt;script lang=&quot;ts&quot;&gt;
  2:   import { Topic, VoidPromiseCallback } from '../types.js';
                       ^
  </code></pre>
  <p>However if you look at file <code>src/types.ts</code> you see at the end:</p>
  <pre class="lang-js prettyprint-override"><code>export type VoidPromiseCallback = {
    resolve: () =&gt; void,
    reject: (reason?: any) =&gt; void,
  }
  </code></pre>
  <p>VS Code agrees that <code>types.ts</code> does export the name, since if I do <em>“go to definition”</em> on the occurrence of <code>VoidPromiseCallback</code> Rollup complains about, it navigates to the export quoted above.</p>
  <p>Any idea what could cause this? I was thinking maybe Rollup did not invalidate a cache regarding the exports of <code>types.ts</code>.</p>