https://github.com/z0gsh1u/vscode-ts-getset
VSCode TypeScript getter / setter Generator
https://github.com/z0gsh1u/vscode-ts-getset
getset typescript
Last synced: 12 months ago
JSON representation
VSCode TypeScript getter / setter Generator
- Host: GitHub
- URL: https://github.com/z0gsh1u/vscode-ts-getset
- Owner: z0gSh1u
- License: mit
- Created: 2020-12-26T04:45:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-04-27T16:06:29.000Z (about 1 year ago)
- Last Synced: 2025-04-27T17:21:18.994Z (about 1 year ago)
- Topics: getset, typescript
- Language: TypeScript
- Homepage: https://marketplace.visualstudio.com/items?itemName=z0gSh1u.vscode-ts-getset
- Size: 182 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vscode-ts-getset
_vscode-ts-getset_ can generate getter and setter for a TypeScript class. It works based on AST (TypeScript Compiler API) instead of Regular Expressions.
## How to Start
- Put your input cursor at the first line of class declaration.
- Run VSCode command `Generate Getter Only` / `Generate Setter Only` / `Generate Getter & Setter` as you want. (Press [F1] on Windows to open VSCode command prompt.)
## Features
- Reliable class property collecting based on TSC API.
- Generations products are inserted automatically at the end of property declarations with pretty alignment.
- Nice error message.
- NOTICE THAT **only those class declarations at top level are supported** currently.
- Only private and protected properties are concerned. And their names should start with an underscore (`_`).
## TODO
Contributions are strongly welcomed!
- [ ] use AST instead of regex to get class name
## License
MIT