
{"id":2095,"date":"2016-10-05T16:48:29","date_gmt":"2016-10-05T20:48:29","guid":{"rendered":"http:\/\/www.ikriv.com\/blog\/?p=2095"},"modified":"2016-10-05T16:48:29","modified_gmt":"2016-10-05T20:48:29","slug":"typescript-compiler-where-are-though","status":"publish","type":"post","link":"https:\/\/ikriv.com\/blog\/?p=2095","title":{"rendered":"Typescript compiler, where art thou"},"content":{"rendered":"<p>I was trying to experiment with Typescript and Visual Studio code, and I found that there are at least three versions of TypeScript compiler one might have:<\/p>\n<p>1. Microsoft compiler tsc.exe that sits in <code>C:\\Program Files (x86)\\Microsoft SDKs\\TypeScript\\x.y<\/code>. It gets installed with Visual Studio. Several versions can be installed side by side: I have 1.0, 1.7, and 1.8, but only one of them will be on the path.<\/p>\n<p>2. Compiler that comes with npm &#8220;typescript&#8221; package: you run &#8220;<code>npm install typescript<\/code>&#8221; and then invoke it via &#8220;<code>node node_modules\/typescript\/bin\/tsc<\/code>&#8220;.<\/p>\n<p>3. Compiler that comes with npm &#8220;tsc&#8221; package.<\/p>\n<p>Compiler #1 seems to work, but it is not very good: it does not support &#8211;watch option (at least not on Windows), and it does not support wildcards or include\/exclude directives in tsconfig.json, so you must name all files in your project explicitly. So, if you use <code>Visual Studio Code->Command Palette->Configure Task Runner->TypeScript - Watch mode<\/code>, generated task simply fails. It is a little funny to see a Microsoft product to work on Linux, but not on Windows.<\/p>\n<p>Compiler #2 seems to be very, very old, don&#8217;t use it.<\/p>\n<p>Compiler #3 is the one that works best, but it needs to be invoked with an arcane command line.<\/p>\n<p>Bottom line: <i>e pluribus unum<\/i> may be a good thing in the long run, but it is very, very confusing when you are trying to familiarize yourself with a new technology.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was trying to experiment with Typescript and Visual Studio code, and I found that there are at least three versions of TypeScript compiler one might have: 1. Microsoft compiler <a href=\"https:\/\/ikriv.com\/blog\/?p=2095\" class=\"more-link\">[&hellip;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"Layout":"","footnotes":""},"categories":[1],"tags":[],"class_list":["entry","author-ikriv","post-2095","post","type-post","status-publish","format-standard","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2095"}],"version-history":[{"count":0,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2095\/revisions"}],"wp:attachment":[{"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ikriv.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}