Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit abd0da7

Browse files
crisbetothePunderWoman
authored andcommitted
refactor(compiler): remove unused field from output AST (#58444)
The `ExternalReference.runtime` field wasn't being used anywhere. PR Close #58444
1 parent b25121e commit abd0da7

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

‎packages/compiler/src/output/output_ast.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -886,8 +886,7 @@ export class ExternalExpr extends Expression {
886886
return (
887887
e instanceof ExternalExpr &&
888888
this.value.name === e.value.name &&
889-
this.value.moduleName === e.value.moduleName &&
890-
this.value.runtime === e.value.runtime
889+
this.value.moduleName === e.value.moduleName
891890
);
892891
}
893892

@@ -908,7 +907,6 @@ export class ExternalReference {
908907
constructor(
909908
public moduleName: string | null,
910909
public name: string | null,
911-
public runtime?: any | null,
912910
) {}
913911
// Note: no isEquivalent method here as we use this as an interface too.
914912
}

‎packages/compiler/test/output/output_jit_spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,10 @@ describe('Output JIT', () => {
1616
describe('regression', () => {
1717
it('should generate unique argument names', () => {
1818
const externalIds = newArray(10, 1).map(
19-
(_, index) =>
20-
new o.ExternalReference('@angular/core', `id_${index}_`, {name: `id_${index}_`}),
19+
(_, index) => new o.ExternalReference('@angular/core', `id_${index}_`),
2120
);
2221
const externalIds1 = newArray(10, 1).map(
23-
(_, index) =>
24-
new o.ExternalReference('@angular/core', `id_${index}_1`, {name: `id_${index}_1`}),
22+
(_, index) => new o.ExternalReference('@angular/core', `id_${index}_1`),
2523
);
2624
const ctx = EmitterVisitorContext.createRoot();
2725
const reflectorContext: {[key: string]: string} = {};

0 commit comments

Comments
 (0)