From c511ee40ef5893281c1dfd0a2f863dc159753f75 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Mon, 26 Oct 2026 10:54:05 +0100 Subject: [PATCH] fix(compiler-cli): wire up strictUnclaimedEventNames flag Wires up the compiler flag in the preprocessor. --- packages/compiler-cli/preprocessor/src/compiler_options.ts | 1 + packages/compiler-cli/preprocessor/src/tcb.ts | 3 +++ .../src/ngtsc/file_system/testing/src/ngp_known_failures.ts | 5 ----- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/compiler-cli/preprocessor/src/compiler_options.ts b/packages/compiler-cli/preprocessor/src/compiler_options.ts index f175a1f18cb..e0dbe622e6b 100644 --- a/packages/compiler-cli/preprocessor/src/compiler_options.ts +++ b/packages/compiler-cli/preprocessor/src/compiler_options.ts @@ -100,6 +100,7 @@ export interface NgpCompilerOptions { strictAttributeTypes?: boolean; strictContextGenerics?: boolean; strictLiteralTypes?: boolean; + strictUnclaimedEventNames?: boolean; typeCheckHostBindings?: boolean; // Diagnostics (`DiagnosticOptions`). diff --git a/packages/compiler-cli/preprocessor/src/tcb.ts b/packages/compiler-cli/preprocessor/src/tcb.ts index 9b9115bca18..251aedb4d49 100644 --- a/packages/compiler-cli/preprocessor/src/tcb.ts +++ b/packages/compiler-cli/preprocessor/src/tcb.ts @@ -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); diff --git a/packages/compiler-cli/src/ngtsc/file_system/testing/src/ngp_known_failures.ts b/packages/compiler-cli/src/ngtsc/file_system/testing/src/ngp_known_failures.ts index bcdd2c6e6c5..99f353e6f8f 100644 --- a/packages/compiler-cli/src/ngtsc/file_system/testing/src/ngp_known_failures.ts +++ b/packages/compiler-cli/src/ngtsc/file_system/testing/src/ngp_known_failures.ts @@ -499,11 +499,6 @@ const NGP_KNOWN_NGTSC_FAILURES: ReadonlySet = 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',