This project is read-only.

support for profiles

Topics: General
Oct 7, 2012 at 8:05 AM

Right now the compiler uses one global definition file (lib.d.ts) that contains everything. Both plain JS definitions, DOM API's and even MS specific extensions. 

It would be nice if through some profile parameter provided to the compiler I could indicate what my target platform is and only the appropriate global declarations with be included. 

So then you could easily validate if your code would run on any browser (lets say a generic HTML5 api profile) or only on a specific one. Also the upcoming Window8 API could be its own profile.

Also it would no longer complain when it finds the word "document" in my nodejs code and wrongly assumes that this is about the document object only available in the browser.

Oct 8, 2012 at 5:42 PM

Thanks for the suggestion.  We've heard this a few times, and we're actively looking into it.