I’m developing Win8 app with TypeScript.
To compile my typescript code, I added winrt.d.ts and winjs.d.ts then referenced them
using:
<reference path="winrt.d.ts" static="true" />
<reference path="winjs.d.ts" static="true" />
Compile & build succeeded but IDE’s intelliSense was being very slow. I simply opened winrt.d.ts and checked the file. The file has 18,770 lines which is really huge file to compile on the fly.
Are there any options or methods to reference those huge definition file without compile again just like lib.d.ts?
This slowness seriously hurts my TypeScript selection.
UPDATED:
On the current compiler version (0.8.0), there is no solution.
Hope to see best performance gain in near future release.
UPDATED:
Here is my simply hack to boost dev. performance.
I simply created winrt.compact.d.ts.
Then copy only part of namespaces which are actually used
and save the file.
Fortunately the file(winrt.d.ts) looks like being generated
from several declaration files. So each namespace is
clearly separated from others.
It is much easier to make compact version for WinRT.
Correct me if I’m wrong, but I don’t think that
lib.d.tsis being treated in any special way by the compiler. I took a look at the source code and here is the snippet that deals withlib.d.ts:If the user requests
lib.d.tsto be included, it is simply added to the compilation environment as the first piece of code to compile. All other source files (stored inopts.unnamedare added in exactly the same way:So if
lib.d.tsis not being treated in a special way then this is also not possible for other (declaration) files. Also, on my systemlib.d.tshas 7,677 lines, which is way less than the reported 18,770 forwinrt.d.ts, so it may be that the sum of all the lines is just too much for the compiler to achieve acceptable speed.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.