createDebouncer = timeout => {
  let timer = -1;
  return f => {
    clearTimeout(timer);

    if (f) {
      timer =
      /** @type {any} */
      setTimeout(f, timeout);
    }
  };
}
@param {number} timeout Timeout of the debounce action
@return {function(function():void):void}