It is common with TypeScript to have constructors like this :
export class SlotController {
/*
* This injects the dependency and assigns it to a field
* It is NOT an unused variable
*/
constructor(private service: SlotService) {}
[...]
}
Unfortunately, upon automatic reformat, IntelliJ/WebStorm will add a new line before the closing curly bracket :
constructor(private service: SlotService) {
}
I tried these options under Code Styles > TypeScript
but it does not seem to work
You can try to enable the following options:
Under Settings/Preferences (on macOS) | Editor | Code Style | TypeScript | Wrapping and Braces | Keep when reformatting