title: Handling "export X from 'Y'" when generating d.ts files
body: <p>I am using TypeScript to generate <code>d.ts</code> files from our existing JavaScript codebase which is annotated using JSDoc, as per <a href="https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html" rel="nofollow noreferrer">https://www.typescriptlang.org/docs/handbook/declaration-files/dts-from-js.html</a>.</p>
  <p>My problem is that the TS compiler (understandably) cannot handle some non-TS syntax which otherwise is parseable using Babel, specifically <code>export x from 'y'</code>, e.g.</p>
  <pre><code>export { something } from './somewhere';
  </code></pre>
  <p>This yields the following when emitting types:</p>
  <pre><code>app/utils/index.js:76:1 - error TS1128: Declaration or statement expected.
  
  76 export { something } from './somewhere';
  </code></pre>
  <p>I have tried adding the <code>ts-ignore</code> annotation, but it does not seem to work (I am using TS 4.5). I get the same error as above.</p>
  <pre><code>// @ts-ignore
  export { something } from './somewhere';
  </code></pre>
  <p>Apart from removing this syntax (which is not feasible since we use it a lot), what would be the preferred way of solving this?</p>