diff --git a/packages/platform-browser/src/dom/events/hammer_gestures.ts b/packages/platform-browser/src/dom/events/hammer_gestures.ts index f4f4b9c09c..7e2a5db227 100644 --- a/packages/platform-browser/src/dom/events/hammer_gestures.ts +++ b/packages/platform-browser/src/dom/events/hammer_gestures.ts @@ -63,7 +63,7 @@ export const HAMMER_GESTURE_CONFIG = new InjectionToken('Ha /** Function that loads HammerJS, returning a promise that is resolved once HammerJs is loaded. */ -export type HammerLoader = (() => Promise) | null; +export type HammerLoader = () => Promise; /** Injection token used to provide a {@link HammerLoader} to Angular. */ export const HAMMER_LOADER = new InjectionToken('HammerLoader'); @@ -146,7 +146,7 @@ export class HammerGesturesPlugin extends EventManagerPlugin { constructor( @Inject(DOCUMENT) doc: any, @Inject(HAMMER_GESTURE_CONFIG) private _config: HammerGestureConfig, private console: Console, - @Optional() @Inject(HAMMER_LOADER) private loader?: HammerLoader) { + @Optional() @Inject(HAMMER_LOADER) private loader?: HammerLoader|null) { super(doc); } diff --git a/tools/public_api_guard/platform-browser/platform-browser.d.ts b/tools/public_api_guard/platform-browser/platform-browser.d.ts index d56b6164c4..e1c07cbe9b 100644 --- a/tools/public_api_guard/platform-browser/platform-browser.d.ts +++ b/tools/public_api_guard/platform-browser/platform-browser.d.ts @@ -67,7 +67,7 @@ export declare class HammerGestureConfig { buildHammer(element: HTMLElement): HammerInstance; } -export declare type HammerLoader = (() => Promise) | null; +export declare type HammerLoader = () => Promise; /** @experimental */ export declare function makeStateKey(key: string): StateKey;