{"id":173,"date":"2013-08-06T08:11:00","date_gmt":"2013-08-06T15:11:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/typescript\/2013\/08\/06\/announcing-0-9-1\/"},"modified":"2024-07-01T10:56:34","modified_gmt":"2024-07-01T18:56:34","slug":"announcing-0-9-1","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/typescript\/announcing-0-9-1\/","title":{"rendered":"Announcing 0.9.1"},"content":{"rendered":"<p><span style=\"font-family: arial,helvetica,sans-serif;\">We\u2019re happy to announce the release of TypeScript 0.9.1.\u00a0 With this version we&#8217;ve focused on fit and finish, improving the compiler performance and rounding out the language and ASP.NET support.<\/span><\/p>\n<h2><span style=\"font-family: arial,helvetica,sans-serif;\">Improved Performance<\/span><\/h2>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">When we released 0.9.0, we introduced a re-written compiler and language service which scaled better for interactive use cases and supported many new 0.9 language features, including generics.\u00a0\u00a0One side-effect of this re-write was that command line compiler performance was noticeably slower than in 0.8.3.\u00a0 With 0.9.1, the compiler is now as fast or faster than 0.8.3 for almost all codebases.\u00a0 With 0.9.1, we close many of the performance gaps introduced by 0.9.0, improving both interactive and compiler performance.\u00a0 Windows 8 and 8.1 users of the Visual Studio plugin will also notice further performance improvements, as we&#8217;ve begun using the latest version of Chakra, the JavaScript engine, on those platforms.<\/span><\/p>\n<h2><span style=\"font-family: arial,helvetica,sans-serif;\">New Language Features<\/span><\/h2>\n<h2><span style=\"font-family: arial,helvetica,sans-serif;\">Typing with &#8216;typeof&#8217;<\/span><\/h2>\n<p><span style=\"font-family: arial,helvetica,sans-serif;\">We\u2019ve added support for the \u2018typeof\u2019 operator in type positions.\u00a0 This allows you a way of referring to the type of an expression.\u00a0This is especially handy for working with the shapes of modules, the static side of a class, and enums, which don\u2019t otherwise have a name you can refer to.<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span style=\"font-family: courier new,courier;\"><span style=\"color: #0000ff;\">module<\/span> M {<\/span>\n<span style=\"font-family: courier new,courier;\"><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0 export<\/span> <span style=\"color: #0000ff;\">function<\/span> myFun(x: <span style=\"color: #0000ff;\">number<\/span>) {<\/span>\n<span style=\"font-family: courier new,courier;\"><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return<\/span> x;<\/span>\n<span style=\"font-family: courier new,courier;\">\u00a0\u00a0\u00a0 }<\/span>\n<span style=\"font-family: courier new,courier;\">}<\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\"><span style=\"color: #0000ff;\">var<\/span> m: <span style=\"color: #0000ff;\">typeof<\/span> M = M;<\/span><\/p>\n<h2 style=\"text-align: left;\"><span style=\"font-family: arial,helvetica,sans-serif;\">Better &#8216;this&#8217; handling<\/span><\/h2>\n<p style=\"text-align: left;\">We&#8217;ve relaxed the restrictions on field initializers to now allow &#8216;this&#8217;.\u00a0 This means that classes can now contain both methods on the prototype, and callback functions on the instance.\u00a0 The latter are particularly useful when you want to use a member on the class as a callback function, as in the code above.\u00a0This lets you mix-n-match between \u2018closure\u2019 style and \u2018prototype\u2019 style class member patterns easily.<\/p>\n<p style=\"text-align: left; padding-left: 30px;\"><span style=\"font-family: courier new,courier;\"><span style=\"color: #0000ff;\">class<\/span> Adder {<\/span>\n<span style=\"font-family: courier new,courier;\"><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0 constructor<\/span>(<span style=\"color: #0000ff;\">public<\/span> x: <span style=\"color: #0000ff;\">number<\/span>, <span style=\"color: #0000ff;\">public<\/span> y: <span style=\"color: #0000ff;\">number<\/span>) { }<\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\">\u00a0\u00a0\u00a0 addMembers = (evt: MouseEvent) =&gt; console.log(this.x + this.y);<\/span>\n<span style=\"font-family: courier new,courier;\">}<\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\"><span style=\"color: #0000ff;\">var<\/span> adder = <span style=\"color: #0000ff;\">new<\/span> Adder(3, 4);<\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\">document.onclick = adder.addMembers;<\/span><\/p>\n<h2 style=\"text-align: left;\">No Implicit Any<\/h2>\n<p style=\"text-align: left;\">In the TypeScript 0.8 releases, there was an experimental option to warn anytime the compiler implicitly inferred the type \u2018any\u2019 where it had not been explicitly stated by the developer.\u00a0 Several teams discovered this and began to use it to ensure they were taking full advantage of the TypeScript type checker, and not having \u2018any\u2019 creep in accidentally.\u00a0 With 0.9.1, we are adding full support to this option, which is now available through the \u2018&#8211;noImplicitAny\u2019 compiler flag.\u00a0 For Visual Studio users, we now also support the &lt;TypeScriptNoImplicitAny&gt; project build option.<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"font-family: courier new,courier;\"><span style=\"color: #0000ff;\">var<\/span> x;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color: #008000;\">\/\/ Error: Variable &#8216;x&#8217; implicitly has an &#8216;any&#8217; type<\/span><\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\">x = &#8220;foo&#8221;;<\/span>\n<span style=\"font-family: courier new,courier;\">x = 2;<\/span><\/p>\n<p><span style=\"font-family: courier new,courier;\"><span style=\"color: #0000ff;\">function<\/span> f(y) {\u00a0\u00a0\u00a0 <span style=\"color: #008000;\">\/\/ Error: Parameter &#8216;y&#8217; of f implicitly as an &#8216;any&#8217; type<\/span><\/span>\n<span style=\"font-family: courier new,courier;\"><span style=\"color: #0000ff;\">\u00a0\u00a0\u00a0 return<\/span> y + 1;<\/span>\n<span style=\"font-family: courier new,courier;\">}<\/span><\/p>\n<h2>\u00a0Visual Studio support for ASP.NET projects<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/typescript\/wp-content\/uploads\/sites\/11\/2013\/08\/8625.nuget3_.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-4308\" src=\"https:\/\/devblogs.microsoft.com\/typescript\/wp-content\/uploads\/sites\/11\/2013\/08\/8625.nuget3_.png\" alt=\"Image 8625 nuget3\" width=\"550\" height=\"305\" srcset=\"https:\/\/devblogs.microsoft.com\/typescript\/wp-content\/uploads\/sites\/11\/2013\/08\/8625.nuget3_.png 550w, https:\/\/devblogs.microsoft.com\/typescript\/wp-content\/uploads\/sites\/11\/2013\/08\/8625.nuget3_-300x166.png 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<p>With 0.9.1 on Visual Studio, we have introduced better support for using TypeScript within ASP.NET applications.\u00a0 Keep an eye on the blog for an in-depth look at the features that are now available.<\/p>\n<h2>Download<\/h2>\n<p>Get them while they&#8217;re hot.\u00a0 The updated downloads are available for <a href=\"http:\/\/www.typescriptlang.org\/#Download\">Visual Studio, NPM and source<\/a> through the TypeScript website.\u00a0 Let us know what you think on the <a href=\"http:\/\/typescript.codeplex.com\/discussions\">discussion forums<\/a> and <a href=\"http:\/\/typescript.codeplex.com\/workitem\/list\/basic\">issue tracker<\/a>.<\/p>\n<p><em>Note to users of previous versions of TypeScript &#8211; there is a list of breaking changes with older versions listed <a href=\"http:\/\/typescript.codeplex.com\/wikipage?title=Known breaking changes between 0.8 and 0.9&amp;referringTitle=Documentation\">here<\/a>.\u00a0<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019re happy to announce the release of TypeScript 0.9.1.\u00a0 With this version we&#8217;ve focused on fit and finish, improving the compiler performance and rounding out the language and ASP.NET support. Improved Performance When we released 0.9.0, we introduced a re-written compiler and language service which scaled better for interactive use cases and supported many new [&hellip;]<\/p>\n","protected":false},"author":375,"featured_media":1797,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-173","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-typescript"],"acf":[],"blog_post_summary":"<p>We\u2019re happy to announce the release of TypeScript 0.9.1.\u00a0 With this version we&#8217;ve focused on fit and finish, improving the compiler performance and rounding out the language and ASP.NET support. Improved Performance When we released 0.9.0, we introduced a re-written compiler and language service which scaled better for interactive use cases and supported many new [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts\/173","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\/375"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/comments?post=173"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/posts\/173\/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=173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/categories?post=173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/typescript\/wp-json\/wp\/v2\/tags?post=173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}