<p dir="auto">deno builin module manager (dmm)</p>
<p dir="auto">we know : no need to install js module like in node (npm i ..) when running js/ts code using deno, deno will fetch the module and cach it (if not done) then run it but this don't mean no need for module built in for deno, I think to take real advantage of esm we need subcommand in deno cli : deno dmm<br>
I imagin :<br>
deno dmm update url1  url2<br>
this will update all url1 ( old version ) used in any js/ts in the current directory to url2 ( new version ).<br>
deno dmm outdate<br>
show package need to be updated<br>
...<br>
this will make 90% of your code reutisable in other project and copy-past friendly, I mean we can copy one file content and use it other project without need to declare used module in import_map and without need to have import_map for orginize our modules.</p>
<p dir="auto">Since <code class="notranslate">1.31.2</code> it seems like files in <code class="notranslate">types/</code> are included twice when including using <code class="notranslate">compilerOptions.types</code> in <code class="notranslate">deno.json</code>. First they're checked with <code class="notranslate">.d.ts</code> ending, then with <code class="notranslate">.d.ts.d.ts</code> ending (which wierdly enough works, even though the files does not exist). Then type checker complains that everything in the files are already declared.</p>
<h3 dir="auto">Minimal steps to reproduce</h3>
<p dir="auto">Content of <strong>deno.json</strong></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
    &quot;compilerOptions&quot;: {
        &quot;types&quot;: [
            &quot;./types/wat.d.ts&quot;
        ]
    }
}"><pre class="notranslate">{
    <span class="pl-ent">"compilerOptions"</span>: {
        <span class="pl-ent">"types"</span>: [
            <span class="pl-s"><span class="pl-pds">"</span>./types/wat.d.ts<span class="pl-pds">"</span></span>
        ]
    }
}</pre></div>
<p dir="auto">Content of <strong>types/wat.d.ts</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="declare class wat {
    static wat(): void;
}"><pre class="notranslate"><code class="notranslate">declare class wat {
    static wat(): void;
}
</code></pre></div>
<p dir="auto">Content of <strong>main.ts</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="console.log(&quot;Hello world!&quot;);"><pre class="notranslate"><code class="notranslate">console.log("Hello world!");
</code></pre></div>
<p dir="auto"><strong>Outcome</strong></p>
<p dir="auto">Running <code class="notranslate">deno check main.ts</code></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="TS2300 [ERROR]: Duplicate identifier 'wat'.
declare class wat {
              ~~~
    at /typestest/types/wat.d.ts.d.ts:1:15    

    'wat' was also declared here.
    declare class wat {
                  ~~~
        at /typestest/types/wat.d.ts:1:15"><pre class="notranslate"><code class="notranslate">TS2300 [ERROR]: Duplicate identifier 'wat'.
declare class wat {
              ~~~
    at /typestest/types/wat.d.ts.d.ts:1:15    

    'wat' was also declared here.
    declare class wat {
                  ~~~
        at /typestest/types/wat.d.ts:1:15
</code></pre></div>
<h3 dir="auto">Findings</h3>
<p dir="auto">Including types using the pattern <code class="notranslate">// @deno-types="../types/wat.d.ts"</code> instead of <code class="notranslate">deno.json: compilerOptions.types.wat</code> makes the problem go away.</p>
<p dir="auto">Possibly related to PR <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1610107139" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/18026" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/18026/hovercard" href="https://github.com/denoland/deno/pull/18026">#18026</a></p>
<p dir="auto">Everything is ok in previous version <code class="notranslate">1.31.1</code></p>
<h3 dir="auto">Additional info</h3>
<p dir="auto"><strong>Platform:</strong> Windows 10 / Powershell / VS Code / Deno 1.31.2</p>