fix(compiler-cli): add interpolatedSignalNotInvoked to diagnostics (#52687)

This template diagnostic has been introduced in 8eef694def but was not enabled,
as it was not added to `ALL_DIAGNOSTIC_FACTORIES`.

PR Close #52687
This commit is contained in:
cexbrayat 2023-11-08 17:28:31 +01:00 committed by Jessica Janiuk
parent ea8c9b61d2
commit 8a87e62e19
2 changed files with 6 additions and 8 deletions

View file

@ -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];
}

View file

@ -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';
@ -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
];