{"id":22905,"date":"2018-02-14T15:20:11","date_gmt":"2018-02-14T15:20:11","guid":{"rendered":"https:\/\/blog.jetbrains.com\/webstorm\/?p=9501"},"modified":"2018-02-14T15:20:11","modified_gmt":"2018-02-14T15:20:11","slug":"webstorm-2018-1-eap-181-3741","status":"publish","type":"webstorm","link":"https:\/\/blog.jetbrains.com\/zh-hans\/webstorm\/2018\/02\/webstorm-2018-1-eap-181-3741","title":{"rendered":"WebStorm 2018.1 EAP, 181.3741: TypeScript improvements, better Implement action, new inspection for dependencies"},"content":{"rendered":"<p>The new WebStorm 2018.1 Early Preview build (181.3741.14) is now available!<\/p>\n<p>You can update via\u00a0<a href=\"https:\/\/www.jetbrains.com\/toolbox\/app\/\" target=\"_blank\" rel=\"noopener\">Toolbox App<\/a>, or download the build\u00a0<a href=\"https:\/\/www.jetbrains.com\/webstorm\/eap\" target=\"_blank\" rel=\"noopener\">here<\/a>\u00a0and install it beside your stable WebStorm version.<\/p>\n<p align=\"center\"><a class=\"jb-download-button\" href=\"https:\/\/www.jetbrains.com\/webstorm\/eap\" target=\"_blank\" rel=\"noopener\"><i class=\"download-icon\"><\/i>Download WebStorm 2018.1 EAP<\/a><\/p>\n<p>To learn more about all the new features added in earlier WebStorm 2018.1 EAP builds, please check out these <a href=\"https:\/\/blog.jetbrains.com\/webstorm\/tag\/webstorm-2018-1\/\">blog posts<\/a>.<\/p>\n<h2>Check installed dependencies<\/h2>\n<p>We\u2019ve added a new inspection that checks that the installed version of the node package matches the range specified in package.json.<\/p>\n<p>If the package is listed in <code>devDependencies<\/code> or <code>dependencies<\/code> but is not installed (or is installed but outdated), the quick-fix, available when you press <em>Alt-Enter<\/em>, will suggest running <code>npm install<\/code>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-9502\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/02\/webstorm-package-version.png\" alt=\"package-version\" width=\"600\" \/><\/p>\n<h2><\/h2>\n<h2>TypeScript improvements<\/h2>\n<h3>Support for new language features<\/h3>\n<p>WebStorm adds support for a bunch of new TypeScript features: <a href=\"https:\/\/github.com\/Microsoft\/TypeScript\/pull\/20166\" target=\"_blank\" rel=\"noopener\">definite assignment assertions<\/a> and <a href=\"https:\/\/github.com\/Microsoft\/TypeScript\/pull\/20324\" target=\"_blank\" rel=\"noopener\">numeric separators<\/a> introduced in TypeScript 2.7, and <a href=\"https:\/\/github.com\/Microsoft\/TypeScript\/pull\/21316\/\" target=\"_blank\" rel=\"noopener\">conditional types<\/a> coming in TypeScript 2.8.<\/p>\n<h3>Using a different name for tsconfig.json<\/h3>\n<p>WebStorm now supports TypeScript configuration files with names other than <em>tsconfig.json<\/em>.<!--more--><\/p>\n<p>Applications created with Angular CLI use several TypeScript configuration files located in a different folder: <em>tsconfig.json<\/em>, <em>tsconfig.app.json<\/em>, <em>tsconfig.spec.json<\/em>, and <em>tsconfig.e2e.json<\/em>. WebStorm now recognizes them all as TypeScript config files.<\/p>\n<p>What this means is that the compiler options specified in these files are now correctly applied to the TypeScript files in their scope.<\/p>\n<p>You can add other custom names if you go to <em>Preferences | Editor | File Type<\/em>, search for <em>TypeScript Config<\/em>, and edit the list of associated file names below.<\/p>\n<h3>Documentation from MDN<\/h3>\n<p>Since TypeScript implements all the standard JavaScript APIs, we\u2019ve decided that it might be helpful to provide links to the corresponding <a href=\"https:\/\/developer.mozilla.org\/en-US\/\" target=\"_blank\" rel=\"noopener\">MDN<\/a> articles when showing docs (press F1 to see docs) for standard objects and methods.<\/p>\n<p>If there is no description for a method in the TypeScript <em>lib.d.ts<\/em> file, WebStorm will load the short description from MDN.<\/p>\n<h2><img decoding=\"async\" class=\"alignnone size-full wp-image-9504\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/02\/webstorm-doc-from-mdn-in-ts.png\" alt=\"doc-from-mdn-in-ts\" width=\"600\" \/><\/h2>\n<h2>Implement and Override Members<\/h2>\n<p>We\u2019ve made lots of improvements (and fixed lots of issues) in the way the <em>Implement<\/em> and <em>Override<\/em> actions work in JavaScript and TypeScript. These actions help you implement and override methods and fields inherited from the parent classes and interfaces.<\/p>\n<p>To use <em>Implement<\/em>, put the cursor somewhere in the class or other object and press <em>Ctrl-I<\/em>. For <em>Override<\/em>, press <em>Ctrl-O<\/em>. You can also press <em>Cmd-N\/Alt-Insert<\/em> to open the <em>Generate\u2026<\/em> popup and then select Implement or Override from the list of actions.<\/p>\n<p>The most noticeable change is that <em>Implement Members<\/em> now allows you to add both methods and fields inherited from the parent classes or interfaces. Before, there were two separate actions \u2013 Implement Methods (which has now become Implement Members) and Implement Fields.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-9507\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/02\/webstorm-implement-members.png\" alt=\"implement-members\" width=\"600\" \/><\/p>\n<p>Implement now also works not only for classes, but also for other objects. For example:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-9505\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/02\/webstorm-implement-all.png\" alt=\"implement-all\" width=\"600\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2018\/02\/webstorm-implement-all.gif\" \/><\/p>\n<p>You can find a full list of issues fixed\u00a0in the WebStorm\u00a0project in the\u00a0<a href=\"https:\/\/confluence.jetbrains.com\/display\/WI\/WebStorm+181.3741.14+Release+Notes\" target=\"_blank\" rel=\"noopener\">Release Notes<\/a>.<\/p>\n<p><strong>Please share your feedback and report issues on our\u00a0<a href=\"https:\/\/youtrack.jetbrains.com\/issues\/WEB\" target=\"_blank\" rel=\"noopener\">tracker<\/a>. Thank you!<\/strong><\/p>\n<p><em>WebStorm Team<\/em><\/p>\n","protected":false},"author":221,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","categories":[826],"tags":[2045,193,2846],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/webstorm\/22905"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/webstorm"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/webstorm"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/221"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=22905"}],"version-history":[{"count":0,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/webstorm\/22905\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=22905"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=22905"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=22905"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=22905"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}