<h2 dir="auto">Babelrc, v6.11.4</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="   &quot;babel&quot;: {
      &quot;plugins&quot;: [
       &quot;transform-async-to-generator&quot;,
       &quot;transform-es2015-modules-commonjs&quot;,
       &quot;transform-export-extensions&quot;
     ],
     &quot;presets&quot;: [
       &quot;es2016&quot;
     ]
   }"><pre class="notranslate"><code class="notranslate">   "babel": {
      "plugins": [
       "transform-async-to-generator",
       "transform-es2015-modules-commonjs",
       "transform-export-extensions"
     ],
     "presets": [
       "es2016"
     ]
   }
</code></pre></div>
<h2 dir="auto">Error:</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SyntaxError: /Users/fundon/Dev/repos/trekjs/trek/dist/paths.js: 'super' outside of function or class (32:20)
  30 |
  31 |     return _asyncToGenerator(function* () {
&gt; 32 |       const value = super.get(key) || key;
     |                     ^
  33 |       let matched = value.matched;
  34 |       if (matched &amp;&amp; matched.length) {
  35 |         return matched;
    at Parser.pp.raise (/Users/fundon/Dev/repos/trekjs/trek/node_modules/babylon/lib/parser/location.js:22:13)
    at Parser.pp.parseExprAtom (/Users/fundon/Dev/repos/trekjs/trek/node_modules/babylon/lib/parser/expression.js:393:14)"><pre class="notranslate"><code class="notranslate">SyntaxError: /Users/fundon/Dev/repos/trekjs/trek/dist/paths.js: 'super' outside of function or class (32:20)
  30 |
  31 |     return _asyncToGenerator(function* () {
&gt; 32 |       const value = super.get(key) || key;
     |                     ^
  33 |       let matched = value.matched;
  34 |       if (matched &amp;&amp; matched.length) {
  35 |         return matched;
    at Parser.pp.raise (/Users/fundon/Dev/repos/trekjs/trek/node_modules/babylon/lib/parser/location.js:22:13)
    at Parser.pp.parseExprAtom (/Users/fundon/Dev/repos/trekjs/trek/node_modules/babylon/lib/parser/expression.js:393:14)
</code></pre></div>
<h2 dir="auto">Source code</h2>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import globby from 'globby'

export default class Paths extends Map {

  constructor (root) {
    super()

    this.root = root
  }

  set (key, value) {
    super.set(key, value || key)
    return this
  }

  async get (key, absolute = false) {
    const value = super.get(key) || key
    let matched = value.matched
    if (matched &amp;&amp; matched.length) {
      return matched
    }

    const pattern = value.glob || (value.single ? key : value)
    const result = await globby(pattern, { realpath: absolute, cwd: this.root })
    matched = value.matched = value.single ? result[0] : result
    this.set(key, value)
    return matched
  }

  async getAll (absolute = false) {
    const result = Object.create(null)
    for (const key of this.blueprint.keys()) {
      result[key] = await this.get(key, absolute) // eslint-disable-line babel/no-await-in-loop
    }
    return result
  }

  async globby (pattern, options) {
    return await globby(pattern, options)
  }

}"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">globby</span> <span class="pl-k">from</span> <span class="pl-s">'globby'</span>

<span class="pl-k">export</span> <span class="pl-k">default</span> <span class="pl-k">class</span> <span class="pl-v">Paths</span> <span class="pl-k">extends</span> <span class="pl-v">Map</span> <span class="pl-kos">{</span>

  <span class="pl-en">constructor</span> <span class="pl-kos">(</span><span class="pl-s1">root</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-kos">)</span>

    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">root</span> <span class="pl-c1">=</span> <span class="pl-s1">root</span>
  <span class="pl-kos">}</span>

  <span class="pl-en">set</span> <span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">value</span> <span class="pl-c1">||</span> <span class="pl-s1">key</span><span class="pl-kos">)</span>
    <span class="pl-k">return</span> <span class="pl-smi">this</span>
  <span class="pl-kos">}</span>

  <span class="pl-k">async</span> <span class="pl-en">get</span> <span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">absolute</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">const</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-s1">key</span>
    <span class="pl-k">let</span> <span class="pl-s1">matched</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-c1">matched</span>
    <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">matched</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">matched</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-k">return</span> <span class="pl-s1">matched</span>
    <span class="pl-kos">}</span>

    <span class="pl-k">const</span> <span class="pl-s1">pattern</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-c1">glob</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-c1">single</span> ? <span class="pl-s1">key</span> : <span class="pl-s1">value</span><span class="pl-kos">)</span>
    <span class="pl-k">const</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-en">globby</span><span class="pl-kos">(</span><span class="pl-s1">pattern</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">realpath</span>: <span class="pl-s1">absolute</span><span class="pl-kos">,</span> <span class="pl-c1">cwd</span>: <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">root</span> <span class="pl-kos">}</span><span class="pl-kos">)</span>
    <span class="pl-s1">matched</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-c1">matched</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-c1">single</span> ? <span class="pl-s1">result</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span> : <span class="pl-s1">result</span>
    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">)</span>
    <span class="pl-k">return</span> <span class="pl-s1">matched</span>
  <span class="pl-kos">}</span>

  <span class="pl-k">async</span> <span class="pl-en">getAll</span> <span class="pl-kos">(</span><span class="pl-s1">absolute</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">const</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-c1">null</span><span class="pl-kos">)</span>
    <span class="pl-k">for</span> <span class="pl-kos">(</span><span class="pl-k">const</span> <span class="pl-s1">key</span> <span class="pl-k">of</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">blueprint</span><span class="pl-kos">.</span><span class="pl-en">keys</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">result</span><span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-k">await</span> <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">absolute</span><span class="pl-kos">)</span> <span class="pl-c">// eslint-disable-line babel/no-await-in-loop</span>
    <span class="pl-kos">}</span>
    <span class="pl-k">return</span> <span class="pl-s1">result</span>
  <span class="pl-kos">}</span>

  <span class="pl-k">async</span> <span class="pl-en">globby</span> <span class="pl-kos">(</span><span class="pl-s1">pattern</span><span class="pl-kos">,</span> <span class="pl-s1">options</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-k">await</span> <span class="pl-en">globby</span><span class="pl-kos">(</span><span class="pl-s1">pattern</span><span class="pl-kos">,</span> <span class="pl-s1">options</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span>

<span class="pl-kos">}</span></pre></div>
<h2 dir="auto">Transformed codes</h2>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="'use strict';

Object.defineProperty(exports, &quot;__esModule&quot;, {
  value: true
});

var _globby = require('globby');

var _globby2 = _interopRequireDefault(_globby);

function _interopRequireDefault(obj) { return obj &amp;&amp; obj.__esModule ? obj : { default: obj }; }

function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { return step(&quot;next&quot;, value); }, function (err) { return step(&quot;throw&quot;, err); }); } } return step(&quot;next&quot;); }); }; }

class Paths extends Map {

  constructor(root) {
    super();

    this.root = root;
  }

  set(key, value) {
    super.set(key, value || key);
    return this;
  }

  get(key, absolute = false) {
    var _this = this;

    return _asyncToGenerator(function* () {
      const value = super.get(key) || key;
      let matched = value.matched;
      if (matched &amp;&amp; matched.length) {
        return matched;
      }

      const pattern = value.glob || (value.single ? key : value);
      const result = yield (0, _globby2.default)(pattern, { realpath: absolute, cwd: _this.root });
      matched = value.matched = value.single ? result[0] : result;
      _this.set(key, value);
      return matched;
    })();
  }

  getAll(absolute = false) {
    var _this2 = this;

    return _asyncToGenerator(function* () {
      const result = Object.create(null);
      for (const key of _this2.blueprint.keys()) {
        result[key] = yield _this2.get(key, absolute); // eslint-disable-line babel/no-await-in-loop
      }
      return result;
    })();
  }

  globby(pattern, options) {
    return _asyncToGenerator(function* () {
      return yield (0, _globby2.default)(pattern, options);
    })();
  }

}
exports.default = Paths;"><pre class="notranslate"><span class="pl-s">'use strict'</span><span class="pl-kos">;</span>

<span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">defineProperty</span><span class="pl-kos">(</span><span class="pl-s1">exports</span><span class="pl-kos">,</span> <span class="pl-s">"__esModule"</span><span class="pl-kos">,</span> <span class="pl-kos">{</span>
  <span class="pl-c1">value</span>: <span class="pl-c1">true</span>
<span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">var</span> <span class="pl-s1">_globby</span> <span class="pl-c1">=</span> <span class="pl-en">require</span><span class="pl-kos">(</span><span class="pl-s">'globby'</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">var</span> <span class="pl-s1">_globby2</span> <span class="pl-c1">=</span> <span class="pl-en">_interopRequireDefault</span><span class="pl-kos">(</span><span class="pl-s1">_globby</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

<span class="pl-k">function</span> <span class="pl-en">_interopRequireDefault</span><span class="pl-kos">(</span><span class="pl-s1">obj</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-s1">obj</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">obj</span><span class="pl-kos">.</span><span class="pl-c1">__esModule</span> ? <span class="pl-s1">obj</span> : <span class="pl-kos">{</span> <span class="pl-c1">default</span>: <span class="pl-s1">obj</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">_asyncToGenerator</span><span class="pl-kos">(</span><span class="pl-s1">fn</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</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">var</span> <span class="pl-s1">gen</span> <span class="pl-c1">=</span> <span class="pl-s1">fn</span><span class="pl-kos">.</span><span class="pl-en">apply</span><span class="pl-kos">(</span><span class="pl-smi">this</span><span class="pl-kos">,</span> <span class="pl-smi">arguments</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">return</span> <span class="pl-k">new</span> <span class="pl-v">Promise</span><span class="pl-kos">(</span><span class="pl-k">function</span> <span class="pl-kos">(</span><span class="pl-s1">resolve</span><span class="pl-kos">,</span> <span class="pl-s1">reject</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">function</span> <span class="pl-en">step</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">arg</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">try</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">info</span> <span class="pl-c1">=</span> <span class="pl-s1">gen</span><span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">]</span><span class="pl-kos">(</span><span class="pl-s1">arg</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-k">var</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-s1">info</span><span class="pl-kos">.</span><span class="pl-c1">value</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">catch</span> <span class="pl-kos">(</span><span class="pl-s1">error</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">reject</span><span class="pl-kos">(</span><span class="pl-s1">error</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-kos">}</span> <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">info</span><span class="pl-kos">.</span><span class="pl-c1">done</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-s1">resolve</span><span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-k">else</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-v">Promise</span><span class="pl-kos">.</span><span class="pl-en">resolve</span><span class="pl-kos">(</span><span class="pl-s1">value</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">value</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-en">step</span><span class="pl-kos">(</span><span class="pl-s">"next"</span><span class="pl-kos">,</span> <span class="pl-s1">value</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">err</span><span class="pl-kos">)</span> <span class="pl-kos">{</span> <span class="pl-k">return</span> <span class="pl-en">step</span><span class="pl-kos">(</span><span class="pl-s">"throw"</span><span class="pl-kos">,</span> <span class="pl-s1">err</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">return</span> <span class="pl-en">step</span><span class="pl-kos">(</span><span class="pl-s">"next"</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-k">class</span> <span class="pl-v">Paths</span> <span class="pl-k">extends</span> <span class="pl-v">Map</span> <span class="pl-kos">{</span>

  <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-s1">root</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">super</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

    <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">root</span> <span class="pl-c1">=</span> <span class="pl-s1">root</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>

  <span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">value</span> <span class="pl-c1">||</span> <span class="pl-s1">key</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
    <span class="pl-k">return</span> <span class="pl-smi">this</span><span class="pl-kos">;</span>
  <span class="pl-kos">}</span>

  <span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">absolute</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">var</span> <span class="pl-s1">_this</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">;</span>

    <span class="pl-k">return</span> <span class="pl-en">_asyncToGenerator</span><span class="pl-kos">(</span><span class="pl-k">function</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">const</span> <span class="pl-s1">value</span> <span class="pl-c1">=</span> <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">)</span> <span class="pl-c1">||</span> <span class="pl-s1">key</span><span class="pl-kos">;</span>
      <span class="pl-k">let</span> <span class="pl-s1">matched</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-c1">matched</span><span class="pl-kos">;</span>
      <span class="pl-k">if</span> <span class="pl-kos">(</span><span class="pl-s1">matched</span> <span class="pl-c1">&amp;&amp;</span> <span class="pl-s1">matched</span><span class="pl-kos">.</span><span class="pl-c1">length</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-k">return</span> <span class="pl-s1">matched</span><span class="pl-kos">;</span>
      <span class="pl-kos">}</span>

      <span class="pl-k">const</span> <span class="pl-s1">pattern</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-c1">glob</span> <span class="pl-c1">||</span> <span class="pl-kos">(</span><span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-c1">single</span> ? <span class="pl-s1">key</span> : <span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-k">const</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-k">yield</span> <span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s1">_globby2</span><span class="pl-kos">.</span><span class="pl-c1">default</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-s1">pattern</span><span class="pl-kos">,</span> <span class="pl-kos">{</span> <span class="pl-c1">realpath</span>: <span class="pl-s1">absolute</span><span class="pl-kos">,</span> <span class="pl-c1">cwd</span>: <span class="pl-s1">_this</span><span class="pl-kos">.</span><span class="pl-c1">root</span> <span class="pl-kos">}</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-s1">matched</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-c1">matched</span> <span class="pl-c1">=</span> <span class="pl-s1">value</span><span class="pl-kos">.</span><span class="pl-c1">single</span> ? <span class="pl-s1">result</span><span class="pl-kos">[</span><span class="pl-c1">0</span><span class="pl-kos">]</span> : <span class="pl-s1">result</span><span class="pl-kos">;</span>
      <span class="pl-s1">_this</span><span class="pl-kos">.</span><span class="pl-en">set</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">value</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
      <span class="pl-k">return</span> <span class="pl-s1">matched</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-en">getAll</span><span class="pl-kos">(</span><span class="pl-s1">absolute</span> <span class="pl-c1">=</span> <span class="pl-c1">false</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">var</span> <span class="pl-s1">_this2</span> <span class="pl-c1">=</span> <span class="pl-smi">this</span><span class="pl-kos">;</span>

    <span class="pl-k">return</span> <span class="pl-en">_asyncToGenerator</span><span class="pl-kos">(</span><span class="pl-k">function</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">const</span> <span class="pl-s1">result</span> <span class="pl-c1">=</span> <span class="pl-v">Object</span><span class="pl-kos">.</span><span class="pl-en">create</span><span class="pl-kos">(</span><span class="pl-c1">null</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">const</span> <span class="pl-s1">key</span> <span class="pl-k">of</span> <span class="pl-s1">_this2</span><span class="pl-kos">.</span><span class="pl-c1">blueprint</span><span class="pl-kos">.</span><span class="pl-en">keys</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">result</span><span class="pl-kos">[</span><span class="pl-s1">key</span><span class="pl-kos">]</span> <span class="pl-c1">=</span> <span class="pl-k">yield</span> <span class="pl-s1">_this2</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-s1">key</span><span class="pl-kos">,</span> <span class="pl-s1">absolute</span><span class="pl-kos">)</span><span class="pl-kos">;</span> <span class="pl-c">// eslint-disable-line babel/no-await-in-loop</span>
      <span class="pl-kos">}</span>
      <span class="pl-k">return</span> <span class="pl-s1">result</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-en">globby</span><span class="pl-kos">(</span><span class="pl-s1">pattern</span><span class="pl-kos">,</span> <span class="pl-s1">options</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-en">_asyncToGenerator</span><span class="pl-kos">(</span><span class="pl-k">function</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">return</span> <span class="pl-k">yield</span> <span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-s1">_globby2</span><span class="pl-kos">.</span><span class="pl-c1">default</span><span class="pl-kos">)</span><span class="pl-kos">(</span><span class="pl-s1">pattern</span><span class="pl-kos">,</span> <span class="pl-s1">options</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-s1">exports</span><span class="pl-kos">.</span><span class="pl-c1">default</span> <span class="pl-c1">=</span> <span class="pl-v">Paths</span><span class="pl-kos">;</span></pre></div>
<blockquote>
<p dir="auto">Issue originally made by Dmitriy Krasnikov (dmitriy.krasnikov)</p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.3.26</li>
<li><strong>Node version:</strong> 5.3</li>
<li><strong>npm version:</strong> 3.3.12</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
  plugins:[
    &quot;transform-async-to-generator&quot;,
  ]
}"><pre class="notranslate"><code class="notranslate">{
  plugins:[
    "transform-async-to-generator",
  ]
}
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export class BaseClass {
  async test(id){
    console.log(id);
  }
}
export class ChildClass extends BaseClass{
  async test(id){
    id=1;
    super.test(id);
  }
}

let cls = new ChildClass();
cls.test(5);"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">BaseClass</span> <span class="pl-kos">{</span>
  <span class="pl-k">async</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">id</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-s1">id</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">export</span> <span class="pl-k">class</span> <span class="pl-v">ChildClass</span> <span class="pl-k">extends</span> <span class="pl-v">BaseClass</span><span class="pl-kos">{</span>
  <span class="pl-k">async</span> <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">id</span><span class="pl-kos">)</span><span class="pl-kos">{</span>
    <span class="pl-s1">id</span><span class="pl-c1">=</span><span class="pl-c1">1</span><span class="pl-kos">;</span>
    <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">id</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">let</span> <span class="pl-s1">cls</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">ChildClass</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">cls</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-c1">5</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">Outputs:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="export class BaseClass {
  test(id) {
    return _asyncToGenerator(function* () {
      console.log(id);
    })();
  }
}
export class ChildClass extends BaseClass {
  test(id) {
    return _asyncToGenerator(function* () {
      id = 1;
      super.test(id);
    })();
  }
}

let cls = new ChildClass();
cls.test(5);"><pre class="notranslate"><span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-v">BaseClass</span> <span class="pl-kos">{</span>
  <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">id</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-en">_asyncToGenerator</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-c1">*</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-s1">id</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-k">export</span> <span class="pl-k">class</span> <span class="pl-v">ChildClass</span> <span class="pl-k">extends</span> <span class="pl-v">BaseClass</span> <span class="pl-kos">{</span>
  <span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">id</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-k">return</span> <span class="pl-en">_asyncToGenerator</span><span class="pl-kos">(</span><span class="pl-k">function</span><span class="pl-c1">*</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
      <span class="pl-s1">id</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span><span class="pl-kos">;</span>
      <span class="pl-smi">super</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-s1">id</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-k">let</span> <span class="pl-s1">cls</span> <span class="pl-c1">=</span> <span class="pl-k">new</span> <span class="pl-v">ChildClass</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-s1">cls</span><span class="pl-kos">.</span><span class="pl-en">test</span><span class="pl-kos">(</span><span class="pl-c1">5</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>