Update function return types

This commit is contained in:
Tim Schaub
2020-05-18 17:11:13 -06:00
parent dbca64d224
commit bfee5c00c9
11 changed files with 14 additions and 14 deletions

View File

@@ -65,7 +65,7 @@ import {fromExtent as polygonFromExtent} from './geom/Polygon.js';
* @property {number} duration * @property {number} duration
* @property {boolean} complete * @property {boolean} complete
* @property {function(number):number} easing * @property {function(number):number} easing
* @property {function(boolean)} callback * @property {function(boolean):void} callback
*/ */
/** /**
@@ -95,7 +95,7 @@ import {fromExtent as polygonFromExtent} from './geom/Polygon.js';
* The function will be called for each frame with a number representing a * The function will be called for each frame with a number representing a
* fraction of the animation's duration. The function should return a number * fraction of the animation's duration. The function should return a number
* between 0 and 1 representing the progress toward the destination state. * between 0 and 1 representing the progress toward the destination state.
* @property {function(boolean)} [callback] Function called when the view is in * @property {function(boolean):void} [callback] Function called when the view is in
* its final position. The callback will be called with `true` if the animation * its final position. The callback will be called with `true` if the animation
* series completed on its own or `false` if it was cancelled. * series completed on its own or `false` if it was cancelled.
*/ */

View File

@@ -26,7 +26,7 @@ import {removeChildren, replaceNode} from '../dom.js';
* @property {string|HTMLElement} [collapseLabel='»'] Text label to use * @property {string|HTMLElement} [collapseLabel='»'] Text label to use
* for the expanded attributions button. * for the expanded attributions button.
* Instead of text, also an element (e.g. a `span` element) can be used. * Instead of text, also an element (e.g. a `span` element) can be used.
* @property {function(import("../MapEvent.js").default)} [render] Function called when * @property {function(import("../MapEvent.js").default):void} [render] Function called when
* the control should be re-rendered. This is called in a `requestAnimationFrame` * the control should be re-rendered. This is called in a `requestAnimationFrame`
* callback. * callback.
*/ */

View File

@@ -12,7 +12,7 @@ import {removeNode} from '../dom.js';
* @property {HTMLElement} [element] The element is the control's * @property {HTMLElement} [element] The element is the control's
* container element. This only needs to be specified if you're developing * container element. This only needs to be specified if you're developing
* a custom control. * a custom control.
* @property {function(import("../MapEvent.js").default)} [render] Function called when * @property {function(import("../MapEvent.js").default):void} [render] Function called when
* the control should be re-rendered. This is called in a `requestAnimationFrame` * the control should be re-rendered. This is called in a `requestAnimationFrame`
* callback. * callback.
* @property {HTMLElement|string} [target] Specify a target if you want * @property {HTMLElement|string} [target] Specify a target if you want

View File

@@ -29,7 +29,7 @@ const COORDINATE_FORMAT = 'coordinateFormat';
* @property {string} [className='ol-mouse-position'] CSS class name. * @property {string} [className='ol-mouse-position'] CSS class name.
* @property {import("../coordinate.js").CoordinateFormat} [coordinateFormat] Coordinate format. * @property {import("../coordinate.js").CoordinateFormat} [coordinateFormat] Coordinate format.
* @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection. * @property {import("../proj.js").ProjectionLike} [projection] Projection. Default is the view projection.
* @property {function(import("../MapEvent.js").default)} [render] Function called when the * @property {function(import("../MapEvent.js").default):void} [render] Function called when the
* control should be re-rendered. This is called in a `requestAnimationFrame` * control should be re-rendered. This is called in a `requestAnimationFrame`
* callback. * callback.
* @property {HTMLElement|string} [target] Specify a target if you want the * @property {HTMLElement|string} [target] Specify a target if you want the

View File

@@ -56,7 +56,7 @@ class ControlledMap extends PluggableMap {
* overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used. * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used.
* @property {Array<import("../layer/Layer.js").default>|import("../Collection.js").default<import("../layer/Layer.js").default>} [layers] * @property {Array<import("../layer/Layer.js").default>|import("../Collection.js").default<import("../layer/Layer.js").default>} [layers]
* Layers for the overview map. * Layers for the overview map.
* @property {function(import("../MapEvent.js").default)} [render] Function called when the control * @property {function(import("../MapEvent.js").default):void} [render] Function called when the control
* should be re-rendered. This is called in a `requestAnimationFrame` callback. * should be re-rendered. This is called in a `requestAnimationFrame` callback.
* @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view. * @property {boolean} [rotateWithView=false] Whether the control view should rotate with the main map view.
* @property {HTMLElement|string} [target] Specify a target if you want the control * @property {HTMLElement|string} [target] Specify a target if you want the control

View File

@@ -14,9 +14,9 @@ import {easeOut} from '../easing.js';
* @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip. * @property {string} [tipLabel='Reset rotation'] Text label to use for the rotate tip.
* @property {number} [duration=250] Animation duration in milliseconds. * @property {number} [duration=250] Animation duration in milliseconds.
* @property {boolean} [autoHide=true] Hide the control when rotation is 0. * @property {boolean} [autoHide=true] Hide the control when rotation is 0.
* @property {function(import("../MapEvent.js").default)} [render] Function called when the control should * @property {function(import("../MapEvent.js").default):void} [render] Function called when the control should
* be re-rendered. This is called in a `requestAnimationFrame` callback. * be re-rendered. This is called in a `requestAnimationFrame` callback.
* @property {function()} [resetNorth] Function called when the control is clicked. * @property {function():void} [resetNorth] Function called when the control is clicked.
* This will override the default `resetNorth`. * This will override the default `resetNorth`.
* @property {HTMLElement|string} [target] Specify a target if you want the control to be * @property {HTMLElement|string} [target] Specify a target if you want the control to be
* rendered outside of the map's viewport. * rendered outside of the map's viewport.

View File

@@ -43,7 +43,7 @@ const DEFAULT_DPI = 25.4 / 0.28;
* @property {string} [className='ol-scale-line'] CSS Class name. * @property {string} [className='ol-scale-line'] CSS Class name.
* @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be * @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be
* adjusted to match the dpi used. * adjusted to match the dpi used.
* @property {function(import("../MapEvent.js").default)} [render] Function called when the control * @property {function(import("../MapEvent.js").default):void} [render] Function called when the control
* should be re-rendered. This is called in a `requestAnimationFrame` callback. * should be re-rendered. This is called in a `requestAnimationFrame` callback.
* @property {HTMLElement|string} [target] Specify a target if you want the control * @property {HTMLElement|string} [target] Specify a target if you want the control
* to be rendered outside of the map's viewport. * to be rendered outside of the map's viewport.

View File

@@ -26,7 +26,7 @@ const Direction = {
* @typedef {Object} Options * @typedef {Object} Options
* @property {string} [className='ol-zoomslider'] CSS class name. * @property {string} [className='ol-zoomslider'] CSS class name.
* @property {number} [duration=200] Animation duration in milliseconds. * @property {number} [duration=200] Animation duration in milliseconds.
* @property {function(import("../MapEvent.js").default)} [render] Function called when the control * @property {function(import("../MapEvent.js").default):void} [render] Function called when the control
* should be re-rendered. This is called in a `requestAnimationFrame` callback. * should be re-rendered. This is called in a `requestAnimationFrame` callback.
*/ */

View File

@@ -99,7 +99,7 @@ const GPX_SERIALIZERS = makeStructureNS(NAMESPACE_URIS, {
/** /**
* @typedef {Object} Options * @typedef {Object} Options
* @property {function(Feature, Node)} [readExtensions] Callback function * @property {function(Feature, Node):void} [readExtensions] Callback function
* to process `extensions` nodes. To prevent memory leaks, this callback function must * to process `extensions` nodes. To prevent memory leaks, this callback function must
* not store any references to the node. Note that the `extensions` * not store any references to the node. Note that the `extensions`
* node is not allowed in GPX 1.0. Moreover, only `extensions` * node is not allowed in GPX 1.0. Moreover, only `extensions`

View File

@@ -25,7 +25,7 @@ import {mouseActionButton} from '../events/condition.js';
* @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two * @property {EndCondition} [boxEndCondition] A function that takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and two
* {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired. * {@link module:ol/pixel~Pixel}s to indicate whether a `boxend` event should be fired.
* Default is `true` if the area of the box is bigger than the `minArea` option. * Default is `true` if the area of the box is bigger than the `minArea` option.
* @property {function(this:DragBox, import("../MapBrowserEvent.js").default)} [onBoxEnd] Code to execute just * @property {function(this:DragBox, import("../MapBrowserEvent.js").default):void} [onBoxEnd] Code to execute just
* before `boxend` is fired. * before `boxend` is fired.
*/ */

View File

@@ -10,7 +10,7 @@ import {getValues} from '../obj.js';
* @property {function(import("../MapBrowserEvent.js").default):boolean} [handleDownEvent] * @property {function(import("../MapBrowserEvent.js").default):boolean} [handleDownEvent]
* Function handling "down" events. If the function returns `true` then a drag * Function handling "down" events. If the function returns `true` then a drag
* sequence is started. * sequence is started.
* @property {function(import("../MapBrowserEvent.js").default)} [handleDragEvent] * @property {function(import("../MapBrowserEvent.js").default):void} [handleDragEvent]
* Function handling "drag" events. This function is called on "move" events * Function handling "drag" events. This function is called on "move" events
* during a drag sequence. * during a drag sequence.
* @property {function(import("../MapBrowserEvent.js").default):boolean} [handleEvent] * @property {function(import("../MapBrowserEvent.js").default):boolean} [handleEvent]
@@ -18,7 +18,7 @@ import {getValues} from '../obj.js';
* dispatched to the map. The function may return `false` to prevent the * dispatched to the map. The function may return `false` to prevent the
* propagation of the event to other interactions in the map's interactions * propagation of the event to other interactions in the map's interactions
* chain. * chain.
* @property {function(import("../MapBrowserEvent.js").default)} [handleMoveEvent] * @property {function(import("../MapBrowserEvent.js").default):void} [handleMoveEvent]
* Function handling "move" events. This function is called on "move" events. * Function handling "move" events. This function is called on "move" events.
* This functions is also called during a drag sequence, so during a drag * This functions is also called during a drag sequence, so during a drag
* sequence both the `handleDragEvent` function and this function are called. * sequence both the `handleDragEvent` function and this function are called.