diff --git a/packages/compiler-cli/ngcc/src/rendering/esm_rendering_formatter.ts b/packages/compiler-cli/ngcc/src/rendering/esm_rendering_formatter.ts index 9c25067523236..b78e5ea14136d 100644 --- a/packages/compiler-cli/ngcc/src/rendering/esm_rendering_formatter.ts +++ b/packages/compiler-cli/ngcc/src/rendering/esm_rendering_formatter.ts @@ -96,7 +96,7 @@ export class EsmRenderingFormatter implements RenderingFormatter { if (!classSymbol) { throw new Error(`Compiled class does not have a valid symbol: ${compiledClass.name}`); } - const insertionPoint = classSymbol.declaration.valueDeclaration !.getEnd(); + const insertionPoint = classSymbol.declaration.valueDeclaration.getEnd(); output.appendLeft(insertionPoint, '\n' + definitions); }