Generate TS and JS Getters / SettersExisting functions:1.Generate traditional object-oriented set and get methods or ES6 getter and setter functions for TS (TypeScript) and JS (JavaScript). 2.Can identify whether functions are duplicated and avoid generating functions repeatedly. 3.Can prompt for the absence of modifiers and the absence of the underscore ('_'). 4.Can generate functions for a single property, a single file (all classes within the file), and for properties selected in the quick selection box. 5.Can choose whether comments are needed and whether to use the traditional writing method or the ES6 writing method by modifying the configuration items. Some contrasts:1.TypeScript GetSet:nsertion will still be carried out if the function already exists or part of it already exists; If there is one property that is not standardized, all the code cannot be inserted; Only function code in TypeScript (TS) can be generated. functions:Generate the get and set functions for all properties of a class; Generate the get or set functions for all properties of a class. 2.TypeScript Toolbox:Only properties modified by "private" can be inserted; When inserting functions for all properties, only the first class can be recognized; Only function code in TypeScript (TS) can be generated. The advantage is that the insertion speed of analyzing the code using regular expression matching is faster. functions:Generate the get and set functions for all properties of a class;Generate the get or set function for a property;Generate the get and set functions for a property; 3.Getter Setter Ultimate:The code insertion position is at the end of all classes. If there are multiple classes, manual modification is required. functions:Generate the get and set functions in ES6 syntax for the selected properties; Generate the get and set functions in the traditional syntax for the selected properties. 4.TypeScript's Getters and Setters Object Oriented Programming Style:Error messages will be generated when the selected content is incomplete; Only function code in TypeScript (TS) can be generated. functions:Generate the get and set functions for the selected properties. How to USE:(The usage of JavaScript (JS) is the same as that of TypeScript (TS), so only the usage of TypeScript (TS) will be demonstrated.) + Single property insertion function: Select a property and use generateGetterSetter or use the shortcut key Ctrl + Win + Shift + S. For ES6 accessor syntax: For the traditional object-oriented writing method: + File insertion function: Use generateGetterSetterForAll or use the shortcut key Ctrl + Win + Shift + D. + Select property to generate function: Use SelectGSGenerate or use the shortcut key Ctrl + Alt + G.+ + modify the configuration items Whether it is written in ES6 Change the shortcut keys: After pressing Ctrl +Shift +P, enter "ConfigurationES6" click on "ConfigurationES6". Whether to generate function exegesis Change the shortcut keys: After pressing Ctrl +Shift +P, enter "ConfigurationExegesis" click on "ConfigurationExegesis". |