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
This commit is contained in:
parent
eb031c6ff1
commit
b1f040f5a2
|
@ -172,7 +172,7 @@ function entityNameToValue(node: ts.EntityName): ts.Expression|null {
|
||||||
const left = entityNameToValue(node.left);
|
const left = entityNameToValue(node.left);
|
||||||
return left !== null ? ts.createPropertyAccess(left, node.right) : null;
|
return left !== null ? ts.createPropertyAccess(left, node.right) : null;
|
||||||
} else if (ts.isIdentifier(node)) {
|
} else if (ts.isIdentifier(node)) {
|
||||||
return ts.updateIdentifier(node);
|
return ts.getMutableClone(node);
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue