title: typescript export object error declaration or statement expected
body: <p>Can someone please explain why this works in typescript while exporting an object:</p>
  
  <pre><code>export const config={
  port:4000
  };
  </code></pre>
  
  <p>This also works:</p>
  
  <pre><code>const config = { port:4000 };
  export { config };
  </code></pre>
  
  <p>But this gives an error </p>
  
  <pre><code>const config={
    port:4000
  };
  export config;
  </code></pre>
  
  <p>Error : declaration or statement expected.</p>