<p dir="auto">Hello guys, I'm trying to create decorators with the deno, however this is not being possible, the deno console also does not provide me with information.</p>
<p dir="auto">See the code:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="
interface Newable&lt;T&gt; {
    new(...args: any[]): T;
}

function Decorate() {
    return function &lt;T extends Newable&lt;TBaseClass&gt;&gt;(constructor: T): any {
        // extend constructor
        console.log(constructor);
        return class extends constructor {
            protected _extraField: string = '-'
        }; 
    }
}
@Decorate()
class ExtTest{}
console.log((new ExtTest))"><pre lang="class" class="notranslate"><code class="notranslate">
interface Newable&lt;T&gt; {
    new(...args: any[]): T;
}

function Decorate() {
    return function &lt;T extends Newable&lt;TBaseClass&gt;&gt;(constructor: T): any {
        // extend constructor
        console.log(constructor);
        return class extends constructor {
            protected _extraField: string = '-'
        }; 
    }
}
@Decorate()
class ExtTest{}
console.log((new ExtTest))
</code></pre></div>
<p dir="auto">*OBS: I tried remove the &lt;T extends Newable&gt; and but not working<br>
If i comment the "<a class="user-mention notranslate" data-hovercard-type="organization" data-hovercard-url="/orgs/decorate/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/decorate">@decorate</a>" the error fades away.<br>
See the console:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/42474938/82621736-57ef3580-9bb2-11ea-9433-453fe7d6fe05.png"><img src="https://user-images.githubusercontent.com/42474938/82621736-57ef3580-9bb2-11ea-9433-453fe7d6fe05.png" alt="image" style="max-width: 100%;"></a><br>
and my tsconfig.json:<br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/42474938/82621767-6ccbc900-9bb2-11ea-88fa-d12c6c04c0af.png"><img src="https://user-images.githubusercontent.com/42474938/82621767-6ccbc900-9bb2-11ea-88fa-d12c6c04c0af.png" alt="image" style="max-width: 100%;"></a><br>
am i doing something wrong?</p>
<p dir="auto">See you later!</p>
<div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ deno cache https://gist.githubusercontent.com/lucacasonato/e7d549c5c2d92ed4c10170f0a758b952/raw/a5fc2b7cc8b1952e1718103b496cc9254e2a9ada/decorator.ts --config https://gist.githubusercontent.com/lucacasonato/e7d549c5c2d92ed4c10170f0a758b952/raw/a5fc2b7cc8b1952e1718103b496cc9254e2a9ada/tsconfig.json
error:"><pre class="notranslate">$ deno cache https://gist.githubusercontent.com/lucacasonato/e7d549c5c2d92ed4c10170f0a758b952/raw/a5fc2b7cc8b1952e1718103b496cc9254e2a9ada/decorator.ts --config https://gist.githubusercontent.com/lucacasonato/e7d549c5c2d92ed4c10170f0a758b952/raw/a5fc2b7cc8b1952e1718103b496cc9254e2a9ada/tsconfig.json
error:</pre></div>
<p dir="auto">It just errors with <code class="notranslate">error:</code>. Kinda surprising there is no test for this. I'm on a release build from <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/denoland/deno/commit/f98cc34c405aefd1c46fe5c6b5e0051e1a502f64/hovercard" href="https://github.com/denoland/deno/commit/f98cc34c405aefd1c46fe5c6b5e0051e1a502f64"><tt>f98cc34</tt></a>.</p>