diff --git a/lib/browser/webapis-media-query.ts b/lib/browser/webapis-media-query.ts index 10710c1d4..2e85c64cc 100644 --- a/lib/browser/webapis-media-query.ts +++ b/lib/browser/webapis-media-query.ts @@ -14,7 +14,7 @@ return; } const patchEventTargetMethods = - (Zone as any)[(Zone as any)['__symbol__']('patchEventTargetMethods')]; + (Zone as any)[(Zone as any).__symbol__('patchEventTargetMethods')]; patchEventTargetMethods( _global['MediaQueryList'].prototype, 'addListener', 'removeListener', (self: any, args: any[]) => { diff --git a/lib/browser/webapis-notification.ts b/lib/browser/webapis-notification.ts index 05caca781..ab01863f5 100644 --- a/lib/browser/webapis-notification.ts +++ b/lib/browser/webapis-notification.ts @@ -18,7 +18,7 @@ if (!desc || !desc.configurable) { return; } - const patchOnProperties = (Zone as any)[(Zone as any)['__symbol__']('patchOnProperties')]; + const patchOnProperties = (Zone as any)[(Zone as any).__symbol__('patchOnProperties')]; patchOnProperties(Notification.prototype, null); } })(typeof window === 'object' && window || typeof self === 'object' && self || global); diff --git a/lib/extra/bluebird.ts b/lib/extra/bluebird.ts index 3405b83ba..8f254a4be 100644 --- a/lib/extra/bluebird.ts +++ b/lib/extra/bluebird.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ ((_global: any) => { - const __symbol__ = (Zone as any)['__symbol__']; + const __symbol__ = (Zone as any).__symbol__; // TODO: @JiaLiPassion, we can automatically patch bluebird // if global.Promise = Bluebird, but sometimes in nodejs, // global.Promise is not Bluebird, and Bluebird is just be diff --git a/lib/zone-spec/fake-async-test.ts b/lib/zone-spec/fake-async-test.ts index 1393c4826..e165d5b01 100644 --- a/lib/zone-spec/fake-async-test.ts +++ b/lib/zone-spec/fake-async-test.ts @@ -86,7 +86,7 @@ private _microtasks: Function[] = []; private _lastError: Error = null; private _uncaughtPromiseErrors: {rejection: any}[] = - (Promise as any)[(Zone as any)['__symbol__']('uncaughtPromiseErrors')]; + (Promise as any)[(Zone as any).__symbol__('uncaughtPromiseErrors')]; pendingPeriodicTimers: number[] = []; pendingTimers: number[] = []; diff --git a/lib/zone-spec/long-stack-trace.ts b/lib/zone-spec/long-stack-trace.ts index 435b83d34..3ad1bb760 100644 --- a/lib/zone-spec/long-stack-trace.ts +++ b/lib/zone-spec/long-stack-trace.ts @@ -83,7 +83,7 @@ function renderLongStackTrace(frames: LongStackTrace[], stack: string): string { if (!error) { return undefined; } - const task = (error as any)[(Zone as any)['__symbol__']('currentTask')]; + const task = (error as any)[(Zone as any).__symbol__('currentTask')]; const trace = task && task.data && task.data[creationTrace]; if (!trace) { return error.stack; diff --git a/test/browser/element.spec.ts b/test/browser/element.spec.ts index f7cfbffb8..9b55e316d 100644 --- a/test/browser/element.spec.ts +++ b/test/browser/element.spec.ts @@ -92,7 +92,7 @@ describe('element', function() { * For now we are choosing to ignore it and assume that this arrises in tests only. * As an added measure we make sure that all jasmine tests always run in a task. See: jasmine.ts */ - global[(Zone as any)['__symbol__']('setTimeout')](() => { + global[(Zone as any).__symbol__('setTimeout')](() => { let log = ''; button.addEventListener('click', () => { Zone.current.scheduleMicroTask('test', () => log += 'microtask;'); diff --git a/test/common/Error.spec.ts b/test/common/Error.spec.ts index ce748bc66..0f45eed65 100644 --- a/test/common/Error.spec.ts +++ b/test/common/Error.spec.ts @@ -159,7 +159,7 @@ describe('ZoneAwareError', () => { it('should copy customized NativeError properties to ZoneAwareError', () => { const spy = jasmine.createSpy('errorCustomFunction'); - const NativeError = (global as any)[(Zone as any)['__symbol__']('Error')]; + const NativeError = (global as any)[(Zone as any).__symbol__('Error')]; NativeError.customFunction = function(args: any) { spy(args); }; diff --git a/test/extra/bluebird.spec.ts b/test/extra/bluebird.spec.ts index 4f43933e1..81a5437de 100644 --- a/test/extra/bluebird.spec.ts +++ b/test/extra/bluebird.spec.ts @@ -16,7 +16,7 @@ describe('bluebird promise', () => { BluebirdPromise = require('bluebird'); // import bluebird patch require('../../lib/extra/bluebird'); - const patchBluebird = (Zone as any)[(Zone as any)['__symbol__']('bluebird')]; + const patchBluebird = (Zone as any)[(Zone as any).__symbol__('bluebird')]; patchBluebird(BluebirdPromise); }); diff --git a/test/main.ts b/test/main.ts index 7bc0c98fd..68849f16e 100644 --- a/test/main.ts +++ b/test/main.ts @@ -17,7 +17,7 @@ __karma__.loaded = function() {}; System.config({defaultJSExtensions: true}); let browserPatchedPromise = null; -if ((window as any)[(Zone as any)['__symbol__']('setTimeout')]) { +if ((window as any)[(Zone as any).__symbol__('setTimeout')]) { browserPatchedPromise = Promise.resolve('browserPatched'); } else { // this means that Zone has not patched the browser yet, which means we must be running in