From 36e927a8c6cb0f3031c610bd41bfbbd2c76ba4cb Mon Sep 17 00:00:00 2001 From: JiaLiPassion Date: Thu, 26 Mar 2020 21:46:46 +0900 Subject: [PATCH] fix(zone.js): UNPATCHED_EVENTS and PASSIVE_EVENTS should be string[] not boolean (#36258) __zone_symbol__UNPATCHED_EVENTS and __zone_symbol__PASSIVE_EVENTS should be string[] type not boolean. For example: ``` const config = window as ZoneGlobalConfigurations; config.__zone_symbol__UNPATCHED_EVENTS = ['scroll']; config.__zone_symbol__PASSIVE_EVENTS = ['scroll']; ``` PR Close #36258 --- packages/zone.js/lib/zone.configurations.api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/zone.js/lib/zone.configurations.api.ts b/packages/zone.js/lib/zone.configurations.api.ts index 88629890ef..4691f5d740 100644 --- a/packages/zone.js/lib/zone.configurations.api.ts +++ b/packages/zone.js/lib/zone.configurations.api.ts @@ -512,7 +512,7 @@ interface ZoneGlobalConfigurations { * Users can achieve this goal by defining `__zone_symbol__UNPATCHED_EVENTS = ['scroll', * 'mousemove'];` before importing `zone.js`. */ - __zone_symbol__UNPATCHED_EVENTS?: boolean; + __zone_symbol__UNPATCHED_EVENTS?: string[]; /** * Define the event names of the passive listeners. @@ -528,7 +528,7 @@ interface ZoneGlobalConfigurations { * * The preceding code makes all scroll event listeners passive. */ - __zone_symbol__PASSIVE_EVENTS?: boolean; + __zone_symbol__PASSIVE_EVENTS?: string[]; /** * Disable wrapping uncaught promise rejection.