[Typescript][Angular2] Annotations with access modifiers and reformatting code
Hi,
I am running into a problem where annotations followed by an access modifier are reformatted weirdly. Example:
constructor(@MyAnnotation private _myArg: string) {}
will be formatted into
constructor(@MyAnnotation
private _myArg: string) {}
I would like to keep the annotation and the argument specification on the same line. Funny thing is that if you leave the access modifier away (remove private), the formatter will keep it on the same line.
Already found this old topic:http:// https://intellij-support.jetbrains.com/hc/en-us/community/posts/206988665-reformat-code-with-annotation but I am unable to find anything called 'Field anotations' in the Code Style > TypeScript settings.
Please sign in to leave a comment.
Hi there,
AFAIK it's https://youtrack.jetbrains.com/issue/WEB-20849 (already fixed; wait for next update)
Also: https://youtrack.jetbrains.com/issue/WEB-20691 (still pending)