Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Correct me if I'm wrong, but I don't think that <code>lib.d.ts</code> is being treated in any special way by the compiler. I took a look at the source code and here is the snippet that deals with <code>lib.d.ts</code>:</p> <pre><code>if(this.compilationSettings.useDefaultLib) { var compilerFilePath = this.ioHost.getExecutingFilePath(); var binDirPath = this.ioHost.dirName(compilerFilePath); var libStrPath = this.ioHost.resolvePath(binDirPath + "\\lib.d.ts"); code = new TypeScript.SourceUnit(libStrPath, null); this.compilationEnvironment.code.push(code); } </code></pre> <p>If the user requests <code>lib.d.ts</code> to be included, it is simply added to the compilation environment as the first piece of code to compile. All other source files (stored in <code>opts.unnamed</code> are added in exactly the same way:</p> <pre><code>for(var i = 0; i &lt; opts.unnamed.length; i++) { code = new TypeScript.SourceUnit(opts.unnamed[i], null); this.compilationEnvironment.code.push(code); } </code></pre> <p>So if <code>lib.d.ts</code> is not being treated in a special way then this is also not possible for other (declaration) files. Also, on my system <code>lib.d.ts</code> has 7,677 lines, which is way less than the reported 18,770 for <code>winrt.d.ts</code>, so it may be that the sum of all the lines is just too much for the compiler to achieve acceptable speed.</p> <p>Other than that, my only idea is that "something else" is causing the slowdown of your machine. If you provide me with a link to the libraries and a snippet of your code, I can at least measure how long a compilation run takes on my system.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload