<p dir="auto">Would anyone be interested in a PR for bundling ES6 modules into single IFFE-scoped files? (a la <a href="http://rollupjs.org/" rel="nofollow">rollup.js</a>) This would allow bundling for those who don't wish to rely on AMD/System, and remove at least one build step in many scenarios.</p>
<p dir="auto">(Apologies if duplicate. Search/FAQ didn't come up with anything. If additional details are desired, I can put those together as well)</p>
<p dir="auto">Example below (modified from rollupjs's website):</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//main.ts (source)
import * as x from './maths';
var z : number = 3;
console.log( x.cube( 5 ) + z ); "><pre class="notranslate"><span class="pl-c">//main.ts (source)</span>
<span class="pl-k">import</span> <span class="pl-c1">*</span> <span class="pl-k">as</span> <span class="pl-s1">x</span> <span class="pl-k">from</span> <span class="pl-s">'./maths'</span><span class="pl-kos">;</span>
<span class="pl-k">var</span> <span class="pl-s1">z</span> : <span class="pl-smi">number</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span><span class="pl-kos">;</span>
<span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span> <span class="pl-s1">x</span><span class="pl-kos">.</span><span class="pl-en">cube</span><span class="pl-kos">(</span> <span class="pl-c1">5</span> <span class="pl-kos">)</span> <span class="pl-c1">+</span> <span class="pl-s1">z</span> <span class="pl-kos">)</span><span class="pl-kos">;</span> </pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//maths.ts (source)
//variable namespacing could be accomplished by appending, as seen here, or via internal IFFEs
var z : number = 0;

export function square ( x : number ): number {
    return x * x + z;
}

//unreferenced functions intelligently culled
export function cube ( x : number ): number {
    return x * x * x + z;
}"><pre class="notranslate"><span class="pl-c">//maths.ts (source)</span>
<span class="pl-c">//variable namespacing could be accomplished by appending, as seen here, or via internal IFFEs</span>
<span class="pl-k">var</span> <span class="pl-s1">z</span> : <span class="pl-smi">number</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>

<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">square</span> <span class="pl-kos">(</span> <span class="pl-s1">x</span> : <span class="pl-smi">number</span> <span class="pl-kos">)</span>: <span class="pl-smi">number</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-s1">z</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span>

<span class="pl-c">//unreferenced functions intelligently culled</span>
<span class="pl-k">export</span> <span class="pl-k">function</span> <span class="pl-en">cube</span> <span class="pl-kos">(</span> <span class="pl-s1">x</span> : <span class="pl-smi">number</span> <span class="pl-kos">)</span>: <span class="pl-smi">number</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-s1">z</span><span class="pl-kos">;</span>
<span class="pl-kos">}</span></pre></div>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="//main.js (outFile)
(function () {
    'use strict';

    //variable namespacing could be accomplished by appending, as seen here, or via internal IFFEs
    var z$1 = 0;

    //unreferenced functions intelligently culled
    function cube ( x ) {
        return x * x * x + z$1;
    }

    var z = 3;
    console.log( cube( 5 ) + z );

}());"><pre class="notranslate"><span class="pl-c">//main.js (outFile)</span>
<span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-s">'use strict'</span><span class="pl-kos">;</span>

    <span class="pl-c">//variable namespacing could be accomplished by appending, as seen here, or via internal IFFEs</span>
    <span class="pl-k">var</span> <span class="pl-s1">z$1</span> <span class="pl-c1">=</span> <span class="pl-c1">0</span><span class="pl-kos">;</span>

    <span class="pl-c">//unreferenced functions intelligently culled</span>
    <span class="pl-k">function</span> <span class="pl-en">cube</span> <span class="pl-kos">(</span> <span class="pl-s1">x</span> <span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-k">return</span> <span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span> <span class="pl-c1">*</span> <span class="pl-s1">x</span> <span class="pl-c1">+</span> <span class="pl-s1">z$1</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>

    <span class="pl-k">var</span> <span class="pl-s1">z</span> <span class="pl-c1">=</span> <span class="pl-c1">3</span><span class="pl-kos">;</span>
    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span> <span class="pl-en">cube</span><span class="pl-kos">(</span> <span class="pl-c1">5</span> <span class="pl-kos">)</span> <span class="pl-c1">+</span> <span class="pl-s1">z</span> <span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-kos">}</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Relates to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="74445037" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/3089" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/3089/hovercard" href="https://github.com/microsoft/TypeScript/issues/3089">#3089</a>, <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="68134267" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/2743" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/2743/hovercard" href="https://github.com/microsoft/TypeScript/issues/2743">#2743</a>, and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="37906625" data-permission-text="Title is private" data-url="https://github.com/microsoft/TypeScript/issues/17" data-hovercard-type="issue" data-hovercard-url="/microsoft/TypeScript/issues/17/hovercard" href="https://github.com/microsoft/TypeScript/issues/17">#17</a>.</p>
<h1 dir="auto">Goals</h1>
<ul dir="auto">
<li>Bundle <em>js emit</em> for TS projects while preserving internal modular structure (complete with ES6 semantics and <em>despite</em> being concatenated into a single file), <em>but not exposing it publicly</em> and wrapping the chosen entrypoint with a loader for the desired external module system.</li>
</ul>
<h1 dir="auto">Proposal</h1>
<p dir="auto">When all of <code class="notranslate">--bundle</code>, <code class="notranslate">--module</code> and <code class="notranslate">--out</code> are specified, the TS compiler should emit a single amalgamated <code class="notranslate">js</code> file as output. <code class="notranslate">--bundle</code> is a new compiler flag, indicating that the modules used should be concatenated into the output file and loaded with a microloader at runtime. The semantics of this microloader should preserve ES6 module semantics, <em>but may not support TS-specific ES6 module semantics, such as <code class="notranslate">import a = require</code> or <code class="notranslate">exports =</code></em>. This is a major point of discussion, as to if these TS-specific syntax extensions are worth continuing to support with new language features. Additionally, this should wrap the result file with <code class="notranslate">--module</code>-specific declaration wrappers, if need be.</p>
<p dir="auto">Supporting ES6 semantics is some effort - some rewriting/moving and declaration hoisting needs to be done to support circular references between internal modules.</p>
<p dir="auto">Most of the effort involved here involves the design of the microloader and emit for said microloader - since this is compile time, and we don't want to register any new external dependencies at runtime (with this loader), I expect we can make some optimizations compared to, say, using an internal copy of systemjs.</p>
<p dir="auto">Additionally, we need to decide if we want to make further optimizations based on the chosen <code class="notranslate">--module</code> - if the system chosen supports asynchronous module resolution (so not <code class="notranslate">commonjs</code>), then we can potentially use a more lazy, async dependency resolver internally, too.</p>
<p dir="auto">So, to give an example of the emit (let's say we use a system-like thing internally and are emitting a system module):</p>
<p dir="auto">Given:<br>
<code class="notranslate">a.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export * from './b';
export * from './c';"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">'./b'</span><span class="pl-kos">;</span>
<span class="pl-k">export</span> <span class="pl-c1">*</span> <span class="pl-k">from</span> <span class="pl-s">'./c'</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><code class="notranslate">b.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export interface Foo {}

export class Bar {
    constructor() {
        console.log('');
    }

    do(): Foo { throw new Error('Not implemented.'); }
}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>

<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">Bar</span> <span class="pl-kos">{</span>
    <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">''</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>

    <span class="pl-en">do</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: <span class="pl-smi">Foo</span> <span class="pl-kos">{</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-smi">Error</span><span class="pl-kos">(</span><span class="pl-s">'Not implemented.'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><code class="notranslate">c.ts</code>:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export class Baz {}
export interface Foo {}"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">Baz</span> <span class="pl-kos">{</span><span class="pl-kos">}</span>
<span class="pl-k">export</span> <span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">Hypothetically, with <code class="notranslate">--out appLib.js</code>, <code class="notranslate">--bundle a.ts</code> and <code class="notranslate">--module system</code> arguments, we should get something like<br>
<code class="notranslate">appLib.js</code>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="System.register([], function (exports_1) {
  var __system = /* loader code */;
  //a.ts
  __system.register('./a', ['./b', './c'], function(exports_1) {
    function exportStar_1(m) {
        var exports = {};
        for(var n in m) {
            if (n !== &quot;default&quot;) exports[n] = m[n];
        }
        exports_1(exports);
    }
    return {
        setters:[
            function (_b_1) {
                exportStar_1(_b_1);
            },
            function (_c_1) {
                exportStar_1(_c_1);
            }],
        execute: function() {
        }
    }
  });
  //b.ts
  __system.register('./b', [], function(exports_1) {
    var Bar;
    return {
        setters:[],
        execute: function() {
            Bar = (function () {
                function Bar() {
                    console.log('');
                }
                Bar.prototype.do = function () { throw new Error('Not implemented.'); };
                return Bar;
            })();
            exports_1(&quot;Bar&quot;, Bar);
        }
    }
  });
  //c.ts
  __system.register('./c', [], function(exports_1) {
    var Baz;
    return {
        setters:[],
        execute: function() {
            Baz = (function () {
                function Baz() {
                }
                return Baz;
            })();
            exports_1(&quot;Baz&quot;, Baz);
        }
    }
  });

  function exportStar_1(m) {
      var exports = {};
      for(var n in m) {
          if (n !== &quot;default&quot;) exports[n] = m[n];
      }
      exports_1(exports);
  }
  return {
    setters: [], 
    execute: function() {
      __system.import('./a').then(function (_pub_1) {
        exportStar_1(_pub_1);
      });
   };
});"><pre class="notranslate"><span class="pl-v">System</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">exports_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
  <span class="pl-k">var</span> <span class="pl-s1">__system</span> <span class="pl-c1">=</span> <span class="pl-c">/* loader code */</span><span class="pl-kos">;</span>
  <span class="pl-c">//a.ts</span>
  <span class="pl-s1">__system</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-s">'./a'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-s">'./b'</span><span class="pl-kos">,</span> <span class="pl-s">'./c'</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">exports_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">function</span> <span class="pl-en">exportStar_1</span><span class="pl-kos">(</span><span class="pl-s1">m</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-k">var</span> <span class="pl-s1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
        <span class="pl-k">for</span><span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">n</span> <span class="pl-k">in</span> <span class="pl-s1">m</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
            <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">n</span> <span class="pl-c1">!==</span> <span class="pl-s">"default"</span><span class="pl-kos">)</span> <span class="pl-s1">exports</span><span class="pl-kos">[</span><span class="pl-s1">n</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">m</span><span class="pl-kos">[</span><span class="pl-s1">n</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
        <span class="pl-kos">}</span>
        <span class="pl-s1">exports_1</span><span class="pl-kos">(</span><span class="pl-s1">exports</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span>
    <span class="pl-k">return</span> <span class="pl-kos">{</span>
        <span class="pl-c1">setters</span>:<span class="pl-kos">[</span>
            <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">_b_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
                <span class="pl-en">exportStar_1</span><span class="pl-kos">(</span><span class="pl-s1">_b_1</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
            <span class="pl-kos">}</span><span class="pl-kos">,</span>
            <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">_c_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
                <span class="pl-en">exportStar_1</span><span class="pl-kos">(</span><span class="pl-s1">_c_1</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
            <span class="pl-kos">}</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
        <span class="pl-en">execute</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-c">//b.ts</span>
  <span class="pl-s1">__system</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-s">'./b'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">exports_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">var</span> <span class="pl-v">Bar</span><span class="pl-kos">;</span>
    <span class="pl-k">return</span> <span class="pl-kos">{</span>
        <span class="pl-c1">setters</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
        <span class="pl-en">execute</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
            <span class="pl-v">Bar</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
                <span class="pl-k">function</span> <span class="pl-v">Bar</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
                    <span class="pl-smi">console</span><span class="pl-kos">.</span><span class="pl-en">log</span><span class="pl-kos">(</span><span class="pl-s">''</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
                <span class="pl-kos">}</span>
                <span class="pl-v">Bar</span><span class="pl-kos">.</span><span class="pl-c1">prototype</span><span class="pl-kos">.</span><span class="pl-en">do</span> <span class="pl-c1">=</span> <span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">throw</span> <span class="pl-k">new</span> <span class="pl-v">Error</span><span class="pl-kos">(</span><span class="pl-s">'Not implemented.'</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span><span class="pl-kos">;</span>
                <span class="pl-k">return</span> <span class="pl-v">Bar</span><span class="pl-kos">;</span>
            <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
            <span class="pl-s1">exports_1</span><span class="pl-kos">(</span><span class="pl-s">"Bar"</span><span class="pl-kos">,</span> <span class="pl-v">Bar</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
        <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-c">//c.ts</span>
  <span class="pl-s1">__system</span><span class="pl-kos">.</span><span class="pl-en">register</span><span class="pl-kos">(</span><span class="pl-s">'./c'</span><span class="pl-kos">,</span> <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-s1">exports_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">var</span> <span class="pl-v">Baz</span><span class="pl-kos">;</span>
    <span class="pl-k">return</span> <span class="pl-kos">{</span>
        <span class="pl-c1">setters</span>:<span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
        <span class="pl-en">execute</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
            <span class="pl-v">Baz</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
                <span class="pl-k">function</span> <span class="pl-v">Baz</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
                <span class="pl-kos">}</span>
                <span class="pl-k">return</span> <span class="pl-v">Baz</span><span class="pl-kos">;</span>
            <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
            <span class="pl-s1">exports_1</span><span class="pl-kos">(</span><span class="pl-s">"Baz"</span><span class="pl-kos">,</span> <span class="pl-v">Baz</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
        <span class="pl-kos">}</span>
    <span class="pl-kos">}</span>
  <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

  <span class="pl-k">function</span> <span class="pl-en">exportStar_1</span><span class="pl-kos">(</span><span class="pl-s1">m</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-k">var</span> <span class="pl-s1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span><span class="pl-kos">}</span><span class="pl-kos">;</span>
      <span class="pl-k">for</span><span class="pl-kos">(</span><span class="pl-k">var</span> <span class="pl-s1">n</span> <span class="pl-k">in</span> <span class="pl-s1">m</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
          <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">n</span> <span class="pl-c1">!==</span> <span class="pl-s">"default"</span><span class="pl-kos">)</span> <span class="pl-s1">exports</span><span class="pl-kos">[</span><span class="pl-s1">n</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-s1">m</span><span class="pl-kos">[</span><span class="pl-s1">n</span><span class="pl-kos">]</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span>
      <span class="pl-s1">exports_1</span><span class="pl-kos">(</span><span class="pl-s1">exports</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>
  <span class="pl-k">return</span> <span class="pl-kos">{</span>
    <span class="pl-c1">setters</span>: <span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-kos">,</span> 
    <span class="pl-en">execute</span>: <span class="pl-k">function</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-s1">__system</span><span class="pl-kos">.</span><span class="pl-en">import</span><span class="pl-kos">(</span><span class="pl-s">'./a'</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">_pub_1</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-en">exportStar_1</span><span class="pl-kos">(</span><span class="pl-s1">_pub_1</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
   <span class="pl-kos">}</span><span class="pl-kos"></span><span class="pl-kos">;</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>