<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="const camelCase = (s: string) =&gt; s.charAt(0).toUpperCase().concat(s.slice(1));
// error: The module's source code could not be parsed: Expected ',', got ':' at &lt;file-name&gt;

const camelCase = (s) =&gt; s.charAt(0).toUpperCase().concat(s.slice(1));
OK
"><pre class="notranslate"><span class="pl-k">const</span> <span class="pl-en">camelCase</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">s</span>: <span class="pl-smi">string</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">s</span><span class="pl-kos">.</span><span class="pl-en">charAt</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toUpperCase</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">concat</span><span class="pl-kos">(</span><span class="pl-s1">s</span><span class="pl-kos">.</span><span class="pl-en">slice</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-c">// error: The module's source code could not be parsed: Expected ',', got ':' at &lt;file-name&gt;</span>

<span class="pl-k">const</span> <span class="pl-en">camelCase</span> <span class="pl-c1">=</span> <span class="pl-kos">(</span><span class="pl-s1">s</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">s</span><span class="pl-kos">.</span><span class="pl-en">charAt</span><span class="pl-kos">(</span><span class="pl-c1">0</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toUpperCase</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">concat</span><span class="pl-kos">(</span><span class="pl-s1">s</span><span class="pl-kos">.</span><span class="pl-en">slice</span><span class="pl-kos">(</span><span class="pl-c1">1</span><span class="pl-kos">)</span><span class="pl-kos">)</span><span class="pl-kos">;</span>
<span class="pl-smi">OK</span></pre></div>
<p dir="auto">From <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="367497815" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/929" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/929/hovercard" href="https://github.com/denoland/deno/issues/929">#929</a> and <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="384853190" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1226" data-hovercard-type="issue" data-hovercard-url="/denoland/deno/issues/1226/hovercard" href="https://github.com/denoland/deno/issues/1226">#1226</a>, I believe that the intended behaviour is that extension-less shebang scripts are seen as TypeScript files, but that does not seems to be the case?</p>
<p dir="auto">Minimal example:</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="#!/usr/bin/env -S deno run --allow-all
// filename: hi
interface Foo {
  bar: string;
}
console.log(&quot;Hi&quot;);"><pre class="notranslate">#!/usr/bin/env -S deno run --allow-all
<span class="pl-c">// filename: hi</span>
<span class="pl-k">interface</span> <span class="pl-smi">Foo</span> <span class="pl-kos">{</span>
  <span class="pl-c1">bar</span>: <span class="pl-smi">string</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-s">"Hi"</span><span class="pl-kos">)</span><span class="pl-kos">;</span></pre></div>
<p dir="auto">Running <code class="notranslate">./hi</code> or <code class="notranslate">deno run hi</code> yields <code class="notranslate">error: Unexpected token `interface`.</code></p>