title: How do I export an object in TypeScript?
body: <p>For example, I'm trying to export a TS object to get this JavaScript output:</p>
  <pre><code>const path = require('path'),
        rootPath = path.normalize(__dirname + '/..'),
        env = process.env.NODE_ENV || 'development';
  
  let config = {
    development: {
      amqpUrl: &quot;amqp://localhost:15672&quot;,
      root: rootPath
      
    },
    test: {
      amqpUrl: &quot;amqp://localhost:5672&quot;,
      root: rootPath
    
    },
    production: {
      amqpUrl: &quot;amqp://localhost:5672&quot;,
      root: rootPath
  
    }
  };
  module.exports = config[env];
  </code></pre>
  <p>This is my TS, but it's not clear with exporting,</p>
  <pre><code>import path = require(&quot;path&quot;)
      
      const rootPath = path.normalize(__dirname + '/..')
      const env = process.env.NODE_ENV || 'development'
      
      let config = {
        development: {
          amqpUrl: &quot;amqp://localhost:15672&quot;,
          root: rootPath
          
        },
        test: {
          amqpUrl: &quot;amqp://localhost:5672&quot;,
          root: rootPath
        
        },
        production: {
          amqpUrl: &quot;amqp://localhost:5672&quot;,
          root: rootPath
      
        }
      };
  
     /* this is the line i'm having problem how can i export config object*/
      // export config[env];
  </code></pre>
  <p>I've tried <code>export default config[env]</code> but its generated output isn't expected. What am I doing wrong?</p>