{"id":243,"date":"2013-01-29T08:52:00","date_gmt":"2013-01-29T08:52:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/typescript\/2013\/01\/29\/trying-the-latest-typescript-build\/"},"modified":"2019-02-20T10:46:44","modified_gmt":"2019-02-20T17:46:44","slug":"trying-the-latest-typescript-build","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/typescript\/trying-the-latest-typescript-build\/","title":{"rendered":"Trying the Latest TypeScript Build"},"content":{"rendered":"<p>Starting with release 0.8.2.0, you can now update the TypeScript language services file, the compiled JavaScript that powers most of the TypeScript editor features in Visual Studio. This includes tasks like error reporting, compile-on-save, renaming, go to definition, completion lists, signature help, and others.<\/p>\n<p>By updating your TypeScript language services file, you can try out the latest features we&#8217;re working on before they appear in an official release. Naturally, you might encounter bugs here as the code built in the development branches isn&#8217;t as stable or well-tested as the released version.<\/p>\n<p>The majority of the TypeScript editor features are found in a file called <tt><span class=\"code\">typescriptSerivces.js<\/span><\/tt>. To update your file, you&#8217;ll need to get a new copy and overwrite the existing copy.<\/p>\n<p><a name=\"Topic_5394\"><\/a><\/p>\n<h2>Obtaining a new <span class=\"italic\">&#8216;typescriptServices.js&#8217;<\/span> file<\/h2>\n<p><a name=\"Section_5395\"><\/a><\/p>\n<h3>Option 1: Use the LKG<\/h3>\n<p>The LKG (&#8220;Last Known Good&#8221;) version of the compiler is updated somewhat frequently. You can get a copy from CodePlex using the <a href=\"http:\/\/typescript.codeplex.com\/SourceControl\/BrowseLatest?branch=develop\">source browser<\/a> and downloading the <tt><span class=\"code\">typescriptServices.js<\/span><\/tt> file from the <tt><span class=\"code\">bin<\/span><\/tt> directory.<\/p>\n<p><a name=\"Section_5396\"><\/a><\/p>\n<h3>Option 2: Build Locally<\/h3>\n<p><a name=\"Subsection_5397\"><\/a><\/p>\n<h4>Install git and Node.js<\/h4>\n<p>You&#8217;ll need some basic tools first<\/p>\n<ul>\n<li><a href=\"http:\/\/git-scm.com\/downloads\">Install git<\/a>. Some recommendations for the install options:<\/li>\n<ul>\n<li>Don&#8217;t install the Windows Explorer integration unless you plan to use it<\/li>\n<li>Select the <span class=\"italic\">Run Git from the Windows Command Prompt<\/span> option on the following page<\/li>\n<li>Select <span class=\"italic\">Checkout as-is, commit as-is<\/span> option on the following page to minimize any line-ending weirdness<\/li>\n<\/ul>\n<li><a href=\"http:\/\/nodejs.org\/\">Install Node.js<\/a><\/li>\n<\/ul>\n<p><a name=\"Subsection_5398\"><\/a><\/p>\n<h4>Setup a Local Repository<\/h4>\n<pre><span class=\"code\"> &gt; git clone https:\/\/git01.codeplex.com\/typescript <\/span><\/pre>\n<p>This will set up a TypeScript repository in a subfolder of the current folder called &#8216;typescript&#8217;.<\/p>\n<p><a name=\"Subsection_5399\"><\/a><\/p>\n<h4>Select a Branch<\/h4>\n<pre><span class=\"code\"> &gt; cd typescript &gt; git checkout develop <\/span><\/pre>\n<p>If you&#8217;re interested in the latest, the <tt><span class=\"code\">develop<\/span><\/tt> branch is probably your best bet. There may be other branches with active development; if you know of a branch you&#8217;d like to try out instead, replace <tt><span class=\"code\">develop<\/span><\/tt> with that branch name.<\/p>\n<p><a name=\"Subsection_5400\"><\/a><\/p>\n<h4>Get the Development Dependencies<\/h4>\n<pre><span class=\"code\"> &gt; npm install <\/span><\/pre>\n<p>This will install a local copy of <a href=\"https:\/\/github.com\/mde\/jake\"><tt><span class=\"code\">jake<\/span><\/tt><\/a>, the build system we use for TypeScript.<\/p>\n<p><a name=\"Subsection_5401\"><\/a><\/p>\n<h4>Build TypeScript<\/h4>\n<pre><span class=\"code\"> &gt; .\\node_modules\\.bin\\jake local <\/span><\/pre>\n<p>This will produce <tt><span class=\"code\">built\\local\\typescriptServices.js<\/span><\/tt>. Copy that file as indicated below.<\/p>\n<p><a name=\"Subsection_5402\"><\/a><\/p>\n<h4>Iterate<\/h4>\n<p>If you like, you can simply delete the TypeScript folder created in the first step and be done. However, if you come back at a later time and want a new fresh copy (with the latest changes), you&#8217;ll need to run <tt><span class=\"code\">git pull<\/span><\/tt> to get the newest sources. After that, just run <tt><span class=\"code\">jake local<\/span><\/tt> and copy over the <tt><span class=\"code\">typeScriptServices.js<\/span><\/tt> file again.<\/p>\n<p><a name=\"Topic_5403\"><\/a><\/p>\n<h2>Updating TypescriptServices.js<\/h2>\n<p>You&#8217;ll need to locate the folder where the TypeScript extension was installed. Look for a file called <tt><span class=\"code\">typescriptServices.js<\/span><\/tt> in a folder like:<\/p>\n<p><tt><span class=\"code\">C:\\Program Files (x86)\\Microsoft Visual Studio 11.0\\Common7\\IDE\\Extensions\\<span class=\"highlight\">enn4wcm5.z2b<\/span>\\<\/span><\/tt><\/p>\n<p>The highlighted portion at the end there will be different on every machine, but there shouldn&#8217;t be too many of them in the <tt><span class=\"code\">Extensions<\/span><\/tt> folder. In some rare cases, you might have more than one subfolder that has a TypeScript installation in it; if this is the case, you&#8217;ll want to use the newest one (check the Created date).<\/p>\n<p>When you find the one with <tt><span class=\"code\">typescriptServices.js<\/span><\/tt>, backup that file and copy in the new version. After you restart Visual Studio, you&#8217;ll be working with the updated services file.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Starting with release 0.8.2.0, you can now update the TypeScript language services file, the compiled JavaScript that powers most of the TypeScript editor features in Visual Studio. This includes tasks like error reporting, compile-on-save, renaming, go to definition, completion lists, signature help, and others. By updating your TypeScript language services file, you can try out [&hellip;]<\/p>\n","protected":false},"author":376,"featured_media":1797,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[7],"class_list":["post-243","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-typescript","tag-visualstudio"],"acf":[],"blog_post_summary":"<p>Starting with release 0.8.2.0, you can now update the TypeScript language services file, the compiled JavaScript that powers most of the TypeScript editor features in Visual Studio. This includes tasks like error reporting, compile-on-save, renaming, go to definition, completion lists, signature help, and others. By updating your TypeScript language services file, you can try out [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts\/243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/users\/376"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/comments?post=243"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts\/243\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/media\/1797"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/media?parent=243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/categories?post=243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/tags?post=243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}