<p dir="auto">Choose one: is this a bug report or feature request? Bug report</p>
<h3 dir="auto">Input Code</h3>
<p dir="auto"><a href="https://babeljs.io/repl/#?babili=false&amp;browsers=&amp;build=&amp;builtIns=false&amp;code_lz=MYewdgzgLgBATiA7jAvDALAbgFCkrUAGwFcBbMVGAJh2wHo6YAREAUwjFkRDgGtsAbgEM4MAN4wA2gkQBdAFzipRMmAUwA-gBoYAOn1hWADygAlJDAC-O_bsMmAyq1iXKY7AEh0i9zD8wPKkUoOGJWLWx_KwjLHDwIEEJWXUIQAHMACnszJB1spygASloGGAB1Hl4IbEERJWkkdQlJFXJ1bT0DYxzka067boKrN09vcUj_QODQ8Im_a2xY3HAEpJT0rO7zRDzB52KgA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=true&amp;fileSize=false&amp;lineWrap=true&amp;presets=es2015%2Ces2016%2Ces2017%2Creact%2Cstage-0%2Cstage-1%2Cstage-2%2Cstage-3&amp;prettier=false&amp;targets=&amp;version=6.26.0&amp;envVersion=" rel="nofollow">https://babeljs.io/repl/#?babili=false&amp;browsers=&amp;build=&amp;builtIns=false&amp;code_lz=MYewdgzgLgBATiA7jAvDALAbgFCkrUAGwFcBbMVGAJh2wHo6YAREAUwjFkRDgGtsAbgEM4MAN4wA2gkQBdAFzipRMmAUwA-gBoYAOn1hWADygAlJDAC-O_bsMmAyq1iXKY7AEh0i9zD8wPKkUoOGJWLWx_KwjLHDwIEEJWXUIQAHMACnszJB1spygASloGGAB1Hl4IbEERJWkkdQlJFXJ1bT0DYxzka067boKrN09vcUj_QODQ8Im_a2xY3HAEpJT0rO7zRDzB52KgA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=true&amp;fileSize=false&amp;lineWrap=true&amp;presets=es2015%2Ces2016%2Ces2017%2Creact%2Cstage-0%2Cstage-1%2Cstage-2%2Cstage-3&amp;prettier=false&amp;targets=&amp;version=6.26.0&amp;envVersion=</a></p>
<p dir="auto"><strong>Doesn't Work</strong></p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { [row]: { [column]: _, ...nextRow }, ...nextSet } = {
	4: {
    	2: true,
    },
};
console.log(nextRow, nextSet);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">row</span><span class="pl-kos">]</span>: <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">column</span><span class="pl-kos">]</span>: <span class="pl-s1">_</span><span class="pl-kos">,</span> ...<span class="pl-s1">nextRow</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> ...<span class="pl-s1">nextSet</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
	<span class="pl-c1">4</span>: <span class="pl-kos">{</span>
    	<span class="pl-c1">2</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-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">nextRow</span><span class="pl-kos">,</span> <span class="pl-s1">nextSet</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Work</strong></p>
<p dir="auto">Same code as above:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const { [row]: { [column]: _, ...nextRow }, ...nextSet } = {
	4: {
    	2: true,
    },
};
console.log(nextRow, nextSet);"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">row</span><span class="pl-kos">]</span>: <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">column</span><span class="pl-kos">]</span>: <span class="pl-s1">_</span><span class="pl-kos">,</span> ...<span class="pl-s1">nextRow</span> <span class="pl-kos">}</span><span class="pl-kos">,</span> ...<span class="pl-s1">nextSet</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
	<span class="pl-c1">4</span>: <span class="pl-kos">{</span>
    	<span class="pl-c1">2</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-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">nextRow</span><span class="pl-kos">,</span> <span class="pl-s1">nextSet</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
   &quot;presets&quot;: [&quot;react-app&quot;]
}"><pre class="notranslate">{
   <span class="pl-ent">"presets"</span>: [<span class="pl-s"><span class="pl-pds">"</span>react-app<span class="pl-pds">"</span></span>]
}</pre></div>
<h3 dir="auto">Expected Behavior</h3>
<p dir="auto">Computed numeric properties to be transformed before omitted</p>
<h3 dir="auto">Current Behavior</h3>
<p dir="auto">Requires to manually transform computed numeric properties to strings before omitting</p>
<h3 dir="auto">Possible Solution</h3>
<p dir="auto">Computed numeric properties to be transformed to strings before omitted automatically</p>
<h3 dir="auto">Context</h3>
<p dir="auto">I was surprised to discover a spread operation to work as expected</p>
<h3 dir="auto">Your Environment</h3>
<table role="table">
<thead>
<tr>
<th>software</th>
<th>version(s)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Babel</td>
<td>^7.0.0-beta.38</td>
</tr>
<tr>
<td>node</td>
<td>v9.9.0</td>
</tr>
<tr>
<td>npm</td>
<td>5.5.1</td>
</tr>
<tr>
<td>Operating System</td>
<td>macOS 10.12.6</td>
</tr>
</tbody>
</table>
<p dir="auto">Choose one: is this a bug report or feature request?<br>
bug</p>

<h3 dir="auto">Input Code</h3>


<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const a = { 1: 0, 2: 1, 3: 2 }
const i = 1
const { [i]: val, ...rest } = a"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-s1">a</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span> <span class="pl-c1">1</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span> <span class="pl-c1">2</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span> <span class="pl-c1">3</span>: <span class="pl-c1">2</span> <span class="pl-kos">}</span>
<span class="pl-k">const</span> <span class="pl-s1">i</span> <span class="pl-c1">=</span> <span class="pl-c1">1</span>
<span class="pl-k">const</span> <span class="pl-kos">{</span> <span class="pl-kos">[</span><span class="pl-s1">i</span><span class="pl-kos">]</span>: <span class="pl-s1">val</span><span class="pl-kos">,</span> ...<span class="pl-s1">rest</span> <span class="pl-kos">}</span> <span class="pl-c1">=</span> <span class="pl-s1">a</span></pre></div>
<h3 dir="auto">Babel Configuration (.babelrc, package.json, cli command)</h3>

<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;presets&quot;: [&quot;babel-preset-expo&quot;],
  &quot;env&quot;: {
    &quot;development&quot;: {
      &quot;plugins&quot;: [&quot;transform-react-jsx-source&quot;]
    }
  }
}"><pre class="notranslate">{
  <span class="pl-ent">"presets"</span>: [<span class="pl-s"><span class="pl-pds">"</span>babel-preset-expo<span class="pl-pds">"</span></span>],
  <span class="pl-ent">"env"</span>: {
    <span class="pl-ent">"development"</span>: {
      <span class="pl-ent">"plugins"</span>: [<span class="pl-s"><span class="pl-pds">"</span>transform-react-jsx-source<span class="pl-pds">"</span></span>]
    }
  }
}</pre></div>
<h3 dir="auto">Expected Behavior</h3>


<p dir="auto">rest should be</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;2&quot;: 1,
  &quot;3&quot;: 2,
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"2"</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
  <span class="pl-s">"3"</span>: <span class="pl-c1">2</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span></pre></div>
<h3 dir="auto">Current Behavior</h3>


<p dir="auto">rest is</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;1&quot;: 0,
  &quot;2&quot;: 1,
  &quot;3&quot;: 2,
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"1"</span>: <span class="pl-c1">0</span><span class="pl-kos">,</span>
  <span class="pl-s">"2"</span>: <span class="pl-c1">1</span><span class="pl-kos">,</span>
  <span class="pl-s">"3"</span>: <span class="pl-c1">2</span><span class="pl-kos">,</span>
<span class="pl-kos">}</span></pre></div>
<h3 dir="auto">Possible Solution</h3>


<p dir="auto">indexOf compares with 3 equals and the object key is represented as string<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/babel/babel/blob/88b7983e4f1b4d472f37c057afce0e86da7feb0b/packages/babel-helpers/src/helpers.js#L469">babel/packages/babel-helpers/src/helpers.js</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 469
      in
      <a data-pjax="true" class="commit-tease-sha" href="/babel/babel/commit/88b7983e4f1b4d472f37c057afce0e86da7feb0b">88b7983</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L469" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="469"></td>
          <td id="LC469" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s">      if (excluded.indexOf(key) &gt;= 0) continue;</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<h3 dir="auto">Context</h3>


<p dir="auto">running react-native application</p>
<h3 dir="auto">Your Environment</h3>

<p dir="auto">using react native with expo</p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;expo&quot;: {
    &quot;sdkVersion&quot;: &quot;21.0.0&quot;
  }
}"><pre class="notranslate">{
  <span class="pl-ent">"expo"</span>: {
    <span class="pl-ent">"sdkVersion"</span>: <span class="pl-s"><span class="pl-pds">"</span>21.0.0<span class="pl-pds">"</span></span>
  }
}</pre></div>
<p dir="auto">dont know about configuration</p>