MCPcopy Create free account
hub / github.com/angular/angular / isEquivalent

Method isEquivalent

packages/compiler/src/output/output_ast.ts:1092–1106  ·  view source on GitHub ↗
(e: Expression)

Source from the content-addressed store, hash-verified

1090 }
1091
1092 override isEquivalent(e: Expression): boolean {
1093 if (!(e instanceof ArrowFunctionExpr) || !areAllEquivalent(this.params, e.params)) {
1094 return false;
1095 }
1096
1097 if (this.body instanceof Expression && e.body instanceof Expression) {
1098 return this.body.isEquivalent(e.body);
1099 }
1100
1101 if (Array.isArray(this.body) && Array.isArray(e.body)) {
1102 return areAllEquivalent(this.body, e.body);
1103 }
1104
1105 return false;
1106 }
1107
1108 override isConstant(): boolean {
1109 return false;

Callers

nothing calls this directly

Calls 3

areAllEquivalentFunction · 0.85
isArrayMethod · 0.80
isEquivalentMethod · 0.45

Tested by

no test coverage detected