<p dir="auto"><em>From <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/joaomoreno/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/joaomoreno">@joaomoreno</a> on March 29, 2016 13:31</em></p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/22350/14109628/2eb381c4-f5c3-11e5-940e-a99f173f245e.png"><img src="https://cloud.githubusercontent.com/assets/22350/14109628/2eb381c4-f5c3-11e5-940e-a99f173f245e.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">JS outline always shows duplicate entries for top level functions.</p>
<p dir="auto"><em>Copied from original issue: <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="144265592" data-permission-text="Title is private" data-url="https://github.com/microsoft/vscode/issues/4741" data-hovercard-type="issue" data-hovercard-url="/microsoft/vscode/issues/4741/hovercard" href="https://github.com/microsoft/vscode/issues/4741">microsoft/vscode#4741</a></em></p>
<p dir="auto">On Unixy platforms, tsc should by default not attempt to compile files that begin with a dot (hereafter called "hidden files").  These files are intended to be hidden, and in practice any file that has a name like <code class="notranslate">.foo.ts</code> is always a temporary file written by an editor while saving.</p>
<p dir="auto">Currently, when you run <code class="notranslate">tsc --watch</code> in a directory and hit save in emacs, tsc picks up the hidden temporary file and attempts to compile it, resulting in duplicate definition errors (between the temporary file and the real source file).  And it's surprisingly annoying to work around this problem -- you can't use a glob in your <code class="notranslate">tsconfig.json</code> <code class="notranslate">excludes</code> section, so you instead must enumerate each source file in a <code class="notranslate">files</code> section.</p>
<p dir="auto">It is pretty standard on Unixes to ignore hidden files.  For example the shell "*" ignores hidden files by default, as seen in the output of commands like <code class="notranslate">ls *</code> .</p>
<p dir="auto">I cannot think of any circumstance where someone would want to bring in a hidden file to their compilation, but if they did perhaps they could do so manually via the <code class="notranslate">files</code> section -- it's definitely the sort of thing you ought to need to opt in to.</p>