<p dir="auto">Is it possible to augment the type definition for <code class="notranslate">ComponentOptions</code>?</p>
<p dir="auto">I am using the <a href="https://github.com/jpex-js/vue-inject">vue-inject</a> plugin which allows specifying the <code class="notranslate">dependencies</code> section in a component definition. Unfortunately, I can't get it to work the right way.</p>
<p dir="auto">My <code class="notranslate">vue-augmented.d.ts</code> looks like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import Vue from &quot;vue&quot;;

declare module &quot;vue&quot; {
    export type ComponentOptions&lt;T&gt; = {
        dependencies?: string | string[] | { [key: string]: string };
    }
}"><pre class="notranslate"><code class="notranslate">import Vue from "vue";

declare module "vue" {
    export type ComponentOptions&lt;T&gt; = {
        dependencies?: string | string[] | { [key: string]: string };
    }
}
</code></pre></div>
<p dir="auto">Typescript throws an error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[ts] Duplicate identifier 'ComponentOptions'."><pre class="notranslate"><code class="notranslate">[ts] Duplicate identifier 'ComponentOptions'.
</code></pre></div>
<p dir="auto">P.S. It does work as expected if you hack the original <code class="notranslate">options.d.ts</code> file provided by Vue, but this solution is unacceptable :(</p>
<p dir="auto">Vue 1.0.26<br>
Firefox 47.0</p>
<h3 dir="auto">Reproduction Link</h3>
<p dir="auto"><a href="http://jsfiddle.net/5sH6A/523/" rel="nofollow">http://jsfiddle.net/5sH6A/523/</a></p>
<h3 dir="auto">Info</h3>
<ul dir="auto">
<li>Click the button to toggle the visibility of the <code class="notranslate">&lt;test&gt;</code> component.</li>
<li>The entrance transition works, but the leave transition doesn't, causing the element to remain in the DOM indefinitely.</li>
<li>Clicking the button multiple times results in multiple <code class="notranslate">&lt;test&gt;</code> components in the DOM.</li>
</ul>
<p dir="auto">The following things must be present for the bug to occur:</p>
<ul dir="auto">
<li>It must be a component instance with visibility toggled via <code class="notranslate">v-if</code>.</li>
<li>It must be a flexbox child.</li>
<li>It must be positioned absolutely.</li>
<li>It must have a transition.</li>
<li><code class="notranslate">Vue.config.debug</code> must be false.</li>
</ul>