From b1f040f5a255d829d6da61b60688416e73d0ced4 Mon Sep 17 00:00:00 2001 From: Alex Rickabaugh Date: Wed, 25 Apr 2018 15:41:41 -0700 Subject: [PATCH] fix(compiler-cli): don't rely on incompatible TS method (#23550) g3 and the Angular repo have different versions of TypeScript, and ts.updateIdentifier() has a different signature in the different versions. There is no way to write a call to the function that will compile in both versions simultaneously. Instead, use ts.getMutableClone() as that has the same effect of cloning the identifier. PR Close #23550 --- packages/compiler-cli/src/ngtsc/metadata/src/reflector.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/compiler-cli/src/ngtsc/metadata/src/reflector.ts b/packages/compiler-cli/src/ngtsc/metadata/src/reflector.ts index fd189d1915..9aa26326cd 100644 --- a/packages/compiler-cli/src/ngtsc/metadata/src/reflector.ts +++ b/packages/compiler-cli/src/ngtsc/metadata/src/reflector.ts @@ -172,7 +172,7 @@ function entityNameToValue(node: ts.EntityName): ts.Expression|null { const left = entityNameToValue(node.left); return left !== null ? ts.createPropertyAccess(left, node.right) : null; } else if (ts.isIdentifier(node)) { - return ts.updateIdentifier(node); + return ts.getMutableClone(node); } else { return null; }