refactor(compiler-cli): escape missing decorators. (#56794)

Escaping decorators is required as else they are considered as new JSDocs tags.

fixes #56569

PR Close #56794
This commit is contained in:
Matthieu Riegler 2024-07-01 22:51:29 +02:00 committed by Pawel Kozlowski
parent ae9505b702
commit 2f8bf933f4

View file

@ -15,7 +15,7 @@ import {JsDocTagEntry} from './entities';
* decorators in JsDoc blocks so that they're not parsed as JsDoc tags.
*/
const decoratorExpression =
/@(?=(Injectable|Component|Directive|Pipe|NgModule|Input|Output|HostBinding|HostListener|Inject|Optional|Self|Host|SkipSelf))/g;
/@(?=(Injectable|Component|Directive|Pipe|NgModule|Input|Output|HostBinding|HostListener|Inject|Optional|Self|Host|SkipSelf|ViewChild|ViewChildren|ContentChild|ContentChildren))/g;
/** Gets the set of JsDoc tags applied to a node. */
export function extractJsDocTags(node: ts.HasJSDoc): JsDocTagEntry[] {