diff --git a/scripts/build/transformers/plugin-class.ts b/scripts/build/transformers/plugin-class.ts index c6f353500..ccc4c56b1 100644 --- a/scripts/build/transformers/plugin-class.ts +++ b/scripts/build/transformers/plugin-class.ts @@ -57,7 +57,8 @@ function transformClasses( return ts.visitEachChild( file, node => { - if (node.kind !== ts.SyntaxKind.ClassDeclaration) { + if (node.kind !== ts.SyntaxKind.ClassDeclaration + || (node.modifiers && node.modifiers.find(v => v.kind === ts.SyntaxKind.DeclareKeyword))) { return node; } return transformClass(node, ngcBuild);