fix(v5-builder): stop transforming "declare" classes (#2503)

This commit is contained in:
Nicolas HENRY 2018-05-10 06:44:53 +02:00 committed by Ibby Hadeed
parent db32d2d520
commit 6662234894

View File

@ -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);