Skip to content

Commit

Permalink
Merge pull request #14934 from mike-000/Timeout-typedef
Browse files Browse the repository at this point in the history
Better types for more timeouts
  • Loading branch information
ahocevar committed Jul 22, 2023
2 parents 2af1a81 + 16b8eb5 commit 92bb65b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/ol/Map.js
Expand Up @@ -294,7 +294,7 @@ class Map extends BaseObject {

/**
* @private
* @type {*}
* @type {ReturnType<typeof setTimeout>}
*/
this.postRenderTimeoutHandle_;

Expand Down
2 changes: 1 addition & 1 deletion src/ol/MapBrowserEventHandler.js
Expand Up @@ -26,7 +26,7 @@ class MapBrowserEventHandler extends Target {
this.map_ = map;

/**
* @type {any}
* @type {ReturnType<typeof setTimeout>}
* @private
*/
this.clickTimeoutId_;
Expand Down
2 changes: 1 addition & 1 deletion src/ol/interaction/Draw.js
Expand Up @@ -625,7 +625,7 @@ class Draw extends PointerInteraction {
this.downPx_ = null;

/**
* @type {?}
* @type {ReturnType<typeof setTimeout>}
* @private
*/
this.downTimeout_;
Expand Down
6 changes: 4 additions & 2 deletions src/ol/interaction/MouseWheelZoom.js
Expand Up @@ -116,7 +116,7 @@ class MouseWheelZoom extends Interaction {

/**
* @private
* @type {?}
* @type {ReturnType<typeof setTimeout>}
*/
this.timeoutId_;

Expand All @@ -129,12 +129,14 @@ class MouseWheelZoom extends Interaction {
/**
* Trackpad events separated by this delay will be considered separate
* interactions.
* @private
* @type {number}
*/
this.trackpadEventGap_ = 400;

/**
* @type {?}
* @private
* @type {ReturnType<typeof setTimeout>}
*/
this.trackpadTimeoutId_;

Expand Down

0 comments on commit 92bb65b

Please sign in to comment.