Skip to content

Commit

Permalink
Merge pull request #5506 from Polymer/closure-type-fixes
Browse files Browse the repository at this point in the history
Fix a couple of closure type issues.
  • Loading branch information
kevinpschaaf committed Mar 6, 2019
2 parents 798dfc6 + eb725f7 commit 4b54d18
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/utils/debounce.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export const enqueueDebouncer = function(debouncer) {
/**
* Flushes any enqueued debouncers
*
* @return {void}
* @return {boolean} Returns whether any debouncers were flushed
*/
export const flushDebouncers = function() {
const didFlush = Boolean(debouncerQueue.size);
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/gestures.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ let mouseCanceller = function(mouseEvent) {
if (path[i].nodeType === Node.ELEMENT_NODE) {
if (path[i].localName === 'label') {
clickedLabels.push(/** @type {!HTMLLabelElement} */ (path[i]));
} else if (canBeLabelled(path[i])) {
} else if (canBeLabelled(/** @type {!HTMLElement} */ (path[i]))) {
let ownerLabels =
matchingLabels(/** @type {!HTMLElement} */ (path[i]));
// check if one of the clicked labels is labelling this element
Expand Down Expand Up @@ -387,7 +387,7 @@ export function deepTargetFind(x, y) {
* @return {EventTarget} Returns the event target.
*/
function _findOriginalTarget(ev) {
const path = getComposedPath(/** @type {?Event} */ev);
const path = getComposedPath(/** @type {?Event} */ (ev));
// It shouldn't be, but sometimes path is empty (window on Safari).
return path.length > 0 ? path[0] : ev.target;
}
Expand Down

0 comments on commit 4b54d18

Please sign in to comment.