mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Cast GestureEventListeners.
This improves the closure compiler type checking of GestureEventListeners. Upstreaming of cl/239878806
This commit is contained in:
@@ -27,7 +27,7 @@ import { addListener, removeListener } from '../utils/gestures.js';
|
||||
* cross-platform
|
||||
* gesture events to nodes
|
||||
*/
|
||||
export const GestureEventListeners = dedupingMixin(
|
||||
const _GestureEventListeners = dedupingMixin(
|
||||
/**
|
||||
* @template T
|
||||
* @param {function(new:T)} superClass Class to apply mixin to.
|
||||
@@ -73,3 +73,14 @@ export const GestureEventListeners = dedupingMixin(
|
||||
|
||||
return GestureEventListeners;
|
||||
});
|
||||
|
||||
// Somehow _GestureEventListeners is incorrectly typed as *. For now add this
|
||||
// cast.
|
||||
/**
|
||||
* @template T
|
||||
* @param {function(new:T)} superClass Class to apply mixin to.
|
||||
* @return {function(new:T)} superClass with mixin applied.
|
||||
*/
|
||||
export const GestureEventListeners = function(superClass) {
|
||||
return _GestureEventListeners(superClass);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user