Skip to content

Commit 7a95ccc

Browse files
cexbrayatthePunderWoman
authored andcommitted
fix(compiler-cli): add interpolatedSignalNotInvoked to diagnostics (#52687)
This template diagnostic has been introduced in 8eef694 but was not enabled, as it was not added to `ALL_DIAGNOSTIC_FACTORIES`. PR Close #52687
1 parent 44c48a4 commit 7a95ccc

File tree

2 files changed

+6
-8
lines changed
  • packages/compiler-cli/src/ngtsc/typecheck/extended

2 files changed

+6
-8
lines changed

packages/compiler-cli/src/ngtsc/typecheck/extended/checks/interpolated_signal_not_invoked/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function buildDiagnosticForSignal(
5050
const templateMapping =
5151
ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbol.tcbLocation)!;
5252

53-
const errorString = `${node.name} is a function and should be invoked : ${node.name}()`;
53+
const errorString = `${node.name} is a function and should be invoked: ${node.name}()`;
5454
const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, errorString);
5555
return [diagnostic];
5656
}

packages/compiler-cli/src/ngtsc/typecheck/extended/index.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import {ErrorCode, ExtendedTemplateDiagnosticName} from '../../diagnostics';
1010

1111
import {TemplateCheckFactory} from './api';
12+
import {factory as interpolatedSignalNotInvoked} from './checks/interpolated_signal_not_invoked';
1213
import {factory as invalidBananaInBoxFactory} from './checks/invalid_banana_in_box';
1314
import {factory as missingControlFlowDirectiveFactory} from './checks/missing_control_flow_directive';
1415
import {factory as missingNgForOfLetFactory} from './checks/missing_ngforof_let';
@@ -21,11 +22,8 @@ export {ExtendedTemplateCheckerImpl} from './src/extended_template_checker';
2122

2223
export const ALL_DIAGNOSTIC_FACTORIES:
2324
readonly TemplateCheckFactory<ErrorCode, ExtendedTemplateDiagnosticName>[] = [
24-
invalidBananaInBoxFactory,
25-
nullishCoalescingNotNullableFactory,
26-
optionalChainNotNullableFactory,
27-
missingControlFlowDirectiveFactory,
28-
textAttributeNotBindingFactory,
29-
missingNgForOfLetFactory,
30-
suffixNotSupportedFactory,
25+
invalidBananaInBoxFactory, nullishCoalescingNotNullableFactory,
26+
optionalChainNotNullableFactory, missingControlFlowDirectiveFactory,
27+
textAttributeNotBindingFactory, missingNgForOfLetFactory, suffixNotSupportedFactory,
28+
interpolatedSignalNotInvoked
3129
];

0 commit comments

Comments
 (0)