<p dir="auto">I'm trying to run <code class="notranslate">rollup</code> with <code class="notranslate">--compat</code> flag, however I'm getting following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="❯ deno run --compat --unstable dist/es/rollup.js
Check file:///Users/biwanczuk/dev/rollup/dist/es/rollup.js
error: TS2502 [ERROR]: 'thisArg' is referenced directly or indirectly in its own type annotation.
    bind&lt;T&gt;(this: T, thisArg: ThisParameterType&lt;T&gt;): OmitThisParameter&lt;T&gt;;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.es5.d.ts:350:22
"><pre class="notranslate"><code class="notranslate">❯ deno run --compat --unstable dist/es/rollup.js
Check file:///Users/biwanczuk/dev/rollup/dist/es/rollup.js
error: TS2502 [ERROR]: 'thisArg' is referenced directly or indirectly in its own type annotation.
    bind&lt;T&gt;(this: T, thisArg: ThisParameterType&lt;T&gt;): OmitThisParameter&lt;T&gt;;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.es5.d.ts:350:22

</code></pre></div>
<p dir="auto">I'm not entirely sure what's the problem here, are our declarations out of date?</p>
<p dir="auto">CC <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/kitsonk/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/kitsonk">@kitsonk</a></p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ deno --version
deno 1.6.3 (release, x86_64-apple-darwin)
v8 8.8.294
typescript 4.1.3"><pre class="notranslate">$ <span class="pl-s1">deno --version</span>
<span class="pl-c1">deno 1.6.3 (release, x86_64-apple-darwin)</span>
<span class="pl-c1">v8 8.8.294</span>
<span class="pl-c1">typescript 4.1.3</span></pre></div>
<p dir="auto">I was attempting to import <code class="notranslate">rollup</code> in Deno and getting the following error:</p>
<div class="highlight highlight-text-shell-session notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ deno run rollup.ts
Check file:///Users/craigmorten/git/cmorten/rollup/rollup.ts
error: TS2502
 [ERROR]: 'thisArg' is referenced directly or indirectly in its own type annotation.
    bind&lt;T&gt;(this: T, thisArg: ThisParameterType&lt;T&gt;): OmitThisParameter&lt;T&gt;;
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at asset:///lib.es5.d.ts:350:22"><pre class="notranslate">$ <span class="pl-s1">deno run rollup.ts</span>
<span class="pl-c1">Check file:///Users/craigmorten/git/cmorten/rollup/rollup.ts</span>
<span class="pl-c1">error: TS2502</span>
<span class="pl-c1"> [ERROR]: 'thisArg' is referenced directly or indirectly in its own type annotation.</span>
<span class="pl-c1">    bind&lt;T&gt;(this: T, thisArg: ThisParameterType&lt;T&gt;): OmitThisParameter&lt;T&gt;;</span>
<span class="pl-c1">                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span>
<span class="pl-c1">    at asset:///lib.es5.d.ts:350:22</span></pre></div>
<p dir="auto">Which appears to be a type definitions issue with the <code class="notranslate">CallableFunction</code> <code class="notranslate">bind</code> method definition.</p>
<p dir="auto">REF: <a href="https://github.com/denoland/deno/blob/master/cli/dts/lib.es5.d.ts#L350">https://github.com/denoland/deno/blob/master/cli/dts/lib.es5.d.ts#L350</a></p>
<p dir="auto">Reproduce with:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="// mod.ts
import &quot;https://unpkg.com/rollup@2.36.1/dist/rollup.browser.js&quot;;"><pre class="notranslate"><span class="pl-c">// mod.ts</span>
<span class="pl-k">import</span> <span class="pl-s">"https://unpkg.com/rollup@2.36.1/dist/rollup.browser.js"</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">And running <code class="notranslate">deno run mod.ts</code>.</p>
<p dir="auto">Please advise! I'm unclear if the issue is the use of <code class="notranslate">.bind(...)</code> somewhere in the rollup code, or whether the <code class="notranslate">ThisParameterType&lt;T&gt;</code> type needs a fix?</p>