fix(compiler-cli): wire up strictUnclaimedEventNames flag

Wires up the compiler flag in the preprocessor.
This commit is contained in:
Kristiyan Kostadinov
2026-10-26 22:08:11 +01:00
committed by Kristiyan Kostadinov
parent a91e3b7f57
commit c511ee40ef
3 changed files with 4 additions and 5 deletions
@@ -100,6 +100,7 @@ export interface NgpCompilerOptions {
strictAttributeTypes?: boolean;
strictContextGenerics?: boolean;
strictLiteralTypes?: boolean;
strictUnclaimedEventNames?: boolean;
typeCheckHostBindings?: boolean;
// Diagnostics (`DiagnosticOptions`).
@@ -278,6 +278,9 @@ export function buildTypeCheckingConfig(
if (options.strictLiteralTypes !== undefined) {
typeCheckingConfig.strictLiteralTypes = options.strictLiteralTypes;
}
if (options.strictUnclaimedEventNames !== undefined) {
typeCheckingConfig.checkUnclaimedEventNames = options.strictUnclaimedEventNames;
}
typeCheckingConfig.typeCheckHostBindings = options.typeCheckHostBindings ?? true;
typeCheckingConfig.usePoisonedData =
usePoisonedData || Boolean(options._compilePoisonedComponents);
@@ -499,11 +499,6 @@ const NGP_KNOWN_NGTSC_FAILURES: ReadonlySet<string> = new Set([
'ngtsc type checking should error on non valid typeof expressions',
'ngtsc type checking should report a diagnostic when binding an incompatible type to an input inherited through an intermediate variable declaration in .d.ts',
'ngtsc type checking stability should allow for complete program reuse during incremental compilations',
'ngtsc type checking strictUnclaimedEventNames should report camelCase bubbling custom events listened to via event delegation',
'ngtsc type checking strictUnclaimedEventNames should report events matching neither an output nor a native DOM event',
'ngtsc type checking strictUnclaimedEventNames should report output typos on components even when using CUSTOM_ELEMENTS_SCHEMA',
'ngtsc type checking strictUnclaimedEventNames should report the internal property name of an aliased output',
'ngtsc type checking strictUnclaimedEventNames should report unclaimed camelCase events on elements with matched directives',
'ngtsc type checking tagged template literals should produce diagnostics for invalid tag function',
'ngtsc type checking when input and output go to different directives',
'signal forms should report unsupported two-way bindings on a field',