title: Creating a barrel file in react (using .tsx)
body: <p>Here's my folder structure:</p>
  
  <ul>
  <li>src
  
  <ul>
  <li>assets</li>
  <li>components</li>
  <li>models
  
  <ul>
  <li>counter.tsx</li>
  <li>index.ts</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>Code inside of models/index.tsx (the barrel file)</p>
  
  <pre><code>export * from "./counter";
  </code></pre>
  
  <p>Code inside models/counter.tsx</p>
  
  <pre><code>export default interface ICounter {
    id: number;
    value: number;
  }
  </code></pre>
  
  <p>Import statement</p>
  
  <pre><code>import { ICounter } from "models";
  </code></pre>
  
  <p>The problem is I'm getting an error from my import statement saying that my barrel file has no exported member <code>ICounter</code></p>
  
  <p><img src="https://i.stack.imgur.com/UJeAI.png" alt="import error"></p>
  
  <p>How do you create barrel files in .tsx?</p>