From 6662234894c461a4051305841ceb623f23f4d1f2 Mon Sep 17 00:00:00 2001 From: Nicolas HENRY Date: Thu, 10 May 2018 06:44:53 +0200 Subject: [PATCH] fix(v5-builder): stop transforming "declare" classes (#2503) --- scripts/build/transformers/plugin-class.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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);