Add ': void' to non returning functions (error TS7014)
This commit is contained in:
@@ -6,7 +6,7 @@ class EventSource {
|
||||
|
||||
/**
|
||||
* @param {import("./PointerEventHandler.js").default} dispatcher Event handler.
|
||||
* @param {!Object<string, function(Event)>} mapping Event mapping.
|
||||
* @param {!Object<string, function(Event): void>} mapping Event mapping.
|
||||
*/
|
||||
constructor(dispatcher, mapping) {
|
||||
|
||||
@@ -18,7 +18,7 @@ class EventSource {
|
||||
/**
|
||||
* @private
|
||||
* @const
|
||||
* @type {!Object<string, function(Event)>}
|
||||
* @type {!Object<string, function(Event): void>}
|
||||
*/
|
||||
this.mapping_ = mapping;
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ class PointerEventHandler extends EventTarget {
|
||||
this.pointerMap = {};
|
||||
|
||||
/**
|
||||
* @type {Object<string, function(Event)>}
|
||||
* @type {Object<string, function(Event): void>}
|
||||
* @private
|
||||
*/
|
||||
this.eventMap_ = {};
|
||||
|
||||
@@ -247,7 +247,7 @@ class TouchSource extends EventSource {
|
||||
/**
|
||||
* @private
|
||||
* @param {TouchEvent} inEvent Touch event
|
||||
* @param {function(TouchEvent, PointerEvent)} inFunction In function.
|
||||
* @param {function(TouchEvent, PointerEvent): void} inFunction In function.
|
||||
*/
|
||||
processTouches_(inEvent, inFunction) {
|
||||
const touches = Array.prototype.slice.call(inEvent.changedTouches);
|
||||
|
||||
Reference in New Issue
Block a user