From 32b6c2285e9b3cdcc860e6e87092b54865e12694 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Fri, 20 Sep 2019 13:16:39 -0700 Subject: [PATCH] docs: add comment markers for internal goog.define replacement (#32795) This is needed for closure to properly tree-shake ngDevMode and ngI18nClosureMode. PR Close #32795 --- packages/core/src/util/ng_dev_mode.ts | 3 +++ packages/core/src/util/ng_i18n_closure_mode.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/packages/core/src/util/ng_dev_mode.ts b/packages/core/src/util/ng_dev_mode.ts index d078be0483..eeee40f078 100644 --- a/packages/core/src/util/ng_dev_mode.ts +++ b/packages/core/src/util/ng_dev_mode.ts @@ -8,6 +8,9 @@ import {global} from './global'; +// Do not remove: needed for closure to be able to properly tree-shake ngDevMode. +// goog.define + declare global { /** * Values of ngDevMode diff --git a/packages/core/src/util/ng_i18n_closure_mode.ts b/packages/core/src/util/ng_i18n_closure_mode.ts index a966565819..5e784defdf 100644 --- a/packages/core/src/util/ng_i18n_closure_mode.ts +++ b/packages/core/src/util/ng_i18n_closure_mode.ts @@ -8,6 +8,9 @@ import {global} from './global'; +// Do not remove: needed for closure to be able to properly tree-shake ngI18nClosureMode. +// goog.define + declare global { const ngI18nClosureMode: boolean; }