Skip to content

Commit

Permalink
fix(compiler-cli): add interpolatedSignalNotInvoked to diagnostics (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
cexbrayat authored and thePunderWoman committed Nov 9, 2023
1 parent ea8c9b6 commit 8a87e62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function buildDiagnosticForSignal(
const templateMapping =
ctx.templateTypeChecker.getTemplateMappingAtTcbLocation(symbol.tcbLocation)!;

const errorString = `${node.name} is a function and should be invoked : ${node.name}()`;
const errorString = `${node.name} is a function and should be invoked: ${node.name}()`;
const diagnostic = ctx.makeTemplateDiagnostic(templateMapping.span, errorString);
return [diagnostic];
}
Expand Down
12 changes: 5 additions & 7 deletions packages/compiler-cli/src/ngtsc/typecheck/extended/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import {ErrorCode, ExtendedTemplateDiagnosticName} from '../../diagnostics';

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

export const ALL_DIAGNOSTIC_FACTORIES:
readonly TemplateCheckFactory<ErrorCode, ExtendedTemplateDiagnosticName>[] = [
invalidBananaInBoxFactory,
nullishCoalescingNotNullableFactory,
optionalChainNotNullableFactory,
missingControlFlowDirectiveFactory,
textAttributeNotBindingFactory,
missingNgForOfLetFactory,
suffixNotSupportedFactory,
invalidBananaInBoxFactory, nullishCoalescingNotNullableFactory,
optionalChainNotNullableFactory, missingControlFlowDirectiveFactory,
textAttributeNotBindingFactory, missingNgForOfLetFactory, suffixNotSupportedFactory,
interpolatedSignalNotInvoked
];

0 comments on commit 8a87e62

Please sign in to comment.