From deae751497a41bca4bec9208dc9febcb9f6795af Mon Sep 17 00:00:00 2001 From: vikerman Date: Fri, 4 Aug 2017 10:54:08 -0700 Subject: [PATCH] fix: suppress closure warnings/errors (#861) --- lib/browser/browser.ts | 6 +++++- lib/browser/property-descriptor.ts | 4 ++++ lib/common/error-rewrite.ts | 4 ++++ lib/common/events.ts | 4 ++++ lib/common/timers.ts | 4 ++++ lib/common/utils.ts | 4 ++-- lib/zone-spec/wtf.ts | 4 ++++ 7 files changed, 27 insertions(+), 3 deletions(-) diff --git a/lib/browser/browser.ts b/lib/browser/browser.ts index 4a71dbff8..2347345a6 100644 --- a/lib/browser/browser.ts +++ b/lib/browser/browser.ts @@ -5,6 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +/** + * @fileoverview + * @suppress {missingRequire} + */ import {findEventTasks} from '../common/events'; import {patchTimer} from '../common/timers'; @@ -207,4 +211,4 @@ Zone.__load_patch('PromiseRejectionEvent', (global: any, Zone: ZoneType, api: _Z Zone.__load_patch('util', (global: any, Zone: ZoneType, api: _ZonePrivate) => { api.patchOnProperties = patchOnProperties; api.patchMethod = patchMethod; -}); \ No newline at end of file +}); diff --git a/lib/browser/property-descriptor.ts b/lib/browser/property-descriptor.ts index f8e14a44e..ecbf50b2b 100644 --- a/lib/browser/property-descriptor.ts +++ b/lib/browser/property-descriptor.ts @@ -5,6 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +/** + * @fileoverview + * @suppress {globalThis} + */ import {isBrowser, isMix, isNode, patchClass, patchOnProperties, zoneSymbol} from '../common/utils'; diff --git a/lib/common/error-rewrite.ts b/lib/common/error-rewrite.ts index f1a4437f8..081403572 100644 --- a/lib/common/error-rewrite.ts +++ b/lib/common/error-rewrite.ts @@ -5,6 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +/** + * @fileoverview + * @suppress {globalThis,undefinedVars} + */ /** * Extend the Error with additional fields for rewritten stack frames diff --git a/lib/common/events.ts b/lib/common/events.ts index aca00712b..e8d1d8408 100644 --- a/lib/common/events.ts +++ b/lib/common/events.ts @@ -5,6 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +/** + * @fileoverview + * @suppress {missingRequire} + */ import {attachOriginToPatched, zoneSymbol} from './utils'; export const TRUE_STR = 'true'; diff --git a/lib/common/timers.ts b/lib/common/timers.ts index ce9e12055..9f46c75f7 100644 --- a/lib/common/timers.ts +++ b/lib/common/timers.ts @@ -5,6 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +/** + * @fileoverview + * @suppress {missingRequire} + */ import {patchMethod} from './utils'; diff --git a/lib/common/utils.ts b/lib/common/utils.ts index ffdc2ec8c..35381f483 100644 --- a/lib/common/utils.ts +++ b/lib/common/utils.ts @@ -8,7 +8,7 @@ /** * Suppress closure compiler errors about unknown 'Zone' variable * @fileoverview - * @suppress {undefinedVars,globalThis} + * @suppress {undefinedVars,globalThis,missingRequire} */ // Hack since TypeScript isn't compiling this for a worker. @@ -366,4 +366,4 @@ export function isIEOrEdge() { return ieOrEdge; } catch (error) { } -} \ No newline at end of file +} diff --git a/lib/zone-spec/wtf.ts b/lib/zone-spec/wtf.ts index 01047866c..9c2566f94 100644 --- a/lib/zone-spec/wtf.ts +++ b/lib/zone-spec/wtf.ts @@ -5,6 +5,10 @@ * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ +/** + * @fileoverview + * @suppress {missingRequire} + */ (function(global: any) { interface Wtf {