9/22/2023 0 Comments Jetbrains webstorm v8 0 4WebStorm 2018.2 added an intention which generated cases for ‘switch’. With this handy new intention (Alt-Enter), you can replace properties defined in a constructor with class fields: // Before: Return fetch('').then( result => result.ok)Ĭonvert properties in constructor to class fields In this example, WebStorm knows that `fetch` returns a promise and suggests converting the download function to async: // Before: WebStorm will introduce a new variable and replace Promise.catch with the try-catch block: // Before: Simply press Alt-Enter on the name of the function and select Convert to async function. catch() calls to an async function that uses the async/await syntax – not only in TypeScript files, but also in JavaScript and Flow. With this new intention in the IDE, you can automatically change a function that returns a promise with. There’s also a new Convert parameters to object action (Alt-Enter) that generates a destructuring parameter for a function: For example, the Insert ‘require()’ quick-fix that works in Node.js apps with CommonJS modules now uses destructuring: Some other IDE actions now also default to destructuring. This intention can be very handy when working with React class components: If you want to keep the original assignments, you can use the Introduce object or array destructuring intention ( Alt-Enter), or go with the Extract object or array destructuring refactoring: If not all values from the array or object are used, the resulting destructuring will skip the elements: If you have a piece of code in which you are getting multiple values out of an array or an object, you can now simplify it by using the new Replace with object or array destructuring intention ( Alt-Enter): Let’s see how they can be used when working with objects and arrays. To help you start using destructuring in your code, WebStorm 2019.1 adds a set of new refactorings and intentions that can introduce destructuring to your code. If you’re not yet familiar with destructuring, we recommend reading the great overview in the book Exploring ES6. This feature has a very concise syntax that is often used when you need to pass data in your app. With destructuring, you can unpack values from arrays and objects into variables. JavaScript and TypeScript support Destructuring in JavaScript and TypeScript Version Control: cherry-pick a file from a commit from the VCS log incoming and outgoing commits.IDE improvements: Recent Locations popup save project as a template soft-wraps for selected file types.Testing: highlighting for failed line in test testing with Cucumber and TypeScript.Linters integrations: improved support for ESLint and TSLint in complex projects support for TSLint as TypeScript plugin.Node.js and npm: completion for npm scripts version range tooltip for dependencies run and debug Node.js app when using Docker Compose simple Node.js project template.Development with Vue.js: better support for Vue projects with TypeScript.Development with React: improved completion for merged props Extract Method refactoring for custom React Hooks.Development with Angular: new inspections for Angular projects easier navigation in Angular projects.HTML support: improved HTML documentation.Style sheets support: updated docs for CSS and browser compatibility check extract CSS variable camel case support for CSS Modules support for Less 3.0 features.JavaScript and TypeScript support: intentions for destructuring convert function with Promise to async function convert properties in constructor to class fields inspections for switch statements add or remove export extended error messages in TypeScript.Here are the features and improvements grouped by the WebStorm subsystems: They are compiled from the EAP blog posts that we’ve been publishing here for the past several months. In this blog post we would like to share with you the detailed release notes for this WebStorm update. WebStorm 2019.1 brings with it new smart intentions for JavaScript and TypeScript, improved support for Angular, updated documentation for CSS and HTML, a more powerful debug console, and much more!Įxplore the top new features and download WebStorm 2019.1 on our website.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |