From ff62ff1793f0e486d25189a56d6fdafb511e20d2 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 15 May 2025 11:27:15 +0000 Subject: [PATCH] refactor: explicitly ensure `ngDevMode` types are available (#61365) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit adds an import to the `ng_dev_mode.ts` file that augments `global` to have types for `ngDevMode`. Notably this change is currently not needed because the file is loaded by `ts_library` through `tsconfig#files`— but in a separate PR we are switching the target to `ts_project` which no longer loads all Bazel dependency files via `tsconfig#files`; resulting in the ambient types no longer magically being available. PR Close #61365 --- .../core/primitives/event-dispatch/src/event_dispatcher.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/primitives/event-dispatch/src/event_dispatcher.ts b/packages/core/primitives/event-dispatch/src/event_dispatcher.ts index a859bfd1e23..27f32a1d7ac 100644 --- a/packages/core/primitives/event-dispatch/src/event_dispatcher.ts +++ b/packages/core/primitives/event-dispatch/src/event_dispatcher.ts @@ -13,6 +13,9 @@ import {isCaptureEventType} from './event_type'; import {UnrenamedEventContract} from './eventcontract'; import {Restriction} from './restriction'; +// Necessary to make the `ngDevMode` global types available. +import '../../../src/util/ng_dev_mode'; + /** * A replayer is a function that is called when there are queued events, from the `EventContract`. */