diff --git a/config/jsdoc/api/template/publish.js b/config/jsdoc/api/template/publish.js index 1683993c55..cec1de96bd 100644 --- a/config/jsdoc/api/template/publish.js +++ b/config/jsdoc/api/template/publish.js @@ -168,9 +168,9 @@ function generateSourceFiles(sourceFiles) { * for display purposes. This function mutates the original arrays. * * @private - * @param {Array.} doclets - The array of classes and functions to + * @param {Array} doclets - The array of classes and functions to * check. - * @param {Array.} modules - The array of module doclets to search. + * @param {Array} modules - The array of module doclets to search. */ function attachModuleSymbols(doclets, modules) { const symbols = {}; diff --git a/examples/color-manipulation.js b/examples/color-manipulation.js index 0097f9db16..0d6aaeeeb6 100644 --- a/examples/color-manipulation.js +++ b/examples/color-manipulation.js @@ -20,8 +20,8 @@ const twoPi = 2 * Math.PI; /** * Convert an RGB pixel into an HCL pixel. - * @param {Array.} pixel A pixel in RGB space. - * @return {Array.} A pixel in HCL space. + * @param {Array} pixel A pixel in RGB space. + * @return {Array} A pixel in HCL space. */ function rgb2hcl(pixel) { const red = rgb2xyz(pixel[0]); @@ -55,8 +55,8 @@ function rgb2hcl(pixel) { /** * Convert an HCL pixel into an RGB pixel. - * @param {Array.} pixel A pixel in HCL space. - * @return {Array.} A pixel in RGB space. + * @param {Array} pixel A pixel in HCL space. + * @return {Array} A pixel in RGB space. */ function hcl2rgb(pixel) { const h = pixel[0]; diff --git a/examples/image-filter.js b/examples/image-filter.js index dd8db7ee9e..a35636a2df 100644 --- a/examples/image-filter.js +++ b/examples/image-filter.js @@ -101,7 +101,7 @@ imagery.on('postcompose', function(event) { * Apply a convolution kernel to canvas. This works for any size kernel, but * performance starts degrading above 3 x 3. * @param {CanvasRenderingContext2D} context Canvas 2d context. - * @param {Array.} kernel Kernel. + * @param {Array} kernel Kernel. */ function convolve(context, kernel) { const canvas = context.canvas; diff --git a/examples/raster.js b/examples/raster.js index 5f9314b734..f3b08e912e 100644 --- a/examples/raster.js +++ b/examples/raster.js @@ -12,7 +12,7 @@ const bins = 10; /** * Calculate the Vegetation Greenness Index (VGI) from an input pixel. This * is a rough estimate assuming that pixel values correspond to reflectance. - * @param {Array.} pixel An array of [R, G, B, A] values. + * @param {Array} pixel An array of [R, G, B, A] values. * @return {number} The VGI value for the given pixel. */ function vgi(pixel) { diff --git a/examples/shaded-relief.js b/examples/shaded-relief.js index e0b9db7040..278fb4f022 100644 --- a/examples/shaded-relief.js +++ b/examples/shaded-relief.js @@ -7,7 +7,7 @@ import {OSM, Raster, XYZ} from '../src/ol/source.js'; /** * Generates a shaded relief image given elevation data. Uses a 3x3 * neighborhood for determining slope and aspect. - * @param {Array.} inputs Array of input images. + * @param {Array} inputs Array of input images. * @param {Object} data Data added in the "beforeoperations" event. * @return {ImageData} Output image. */ diff --git a/examples/webpack/example-builder.js b/examples/webpack/example-builder.js index dd4e299a7e..b89d479630 100644 --- a/examples/webpack/example-builder.js +++ b/examples/webpack/example-builder.js @@ -26,7 +26,7 @@ handlebars.registerHelper('indent', (text, options) => { * Create an inverted index of keywords from examples. Property names are * lowercased words. Property values are objects mapping example index to word * count. - * @param {Array.} exampleData Array of example data objects. + * @param {Array} exampleData Array of example data objects. * @return {Object} Word index. */ function createWordIndex(exampleData) { diff --git a/src/ol/Collection.js b/src/ol/Collection.js index ca2f80e5ad..1bdf22478d 100644 --- a/src/ol/Collection.js +++ b/src/ol/Collection.js @@ -62,7 +62,7 @@ export class CollectionEvent extends Event { class Collection extends BaseObject { /** - * @param {Array.=} opt_array Array. + * @param {Array=} opt_array Array. * @param {module:ol/Collection~Options=} opt_options Collection options. */ constructor(opt_array, opt_options) { @@ -79,7 +79,7 @@ class Collection extends BaseObject { /** * @private - * @type {!Array.} + * @type {!Array} */ this.array_ = opt_array ? opt_array : []; @@ -106,7 +106,7 @@ class Collection extends BaseObject { /** * Add elements to the collection. This pushes each item in the provided array * to the end of the collection. - * @param {!Array.} arr Array. + * @param {!Array} arr Array. * @return {module:ol/Collection.} This collection. * @api */ @@ -119,7 +119,7 @@ class Collection extends BaseObject { /** * Iterate over each element, calling the provided callback. - * @param {function(T, number, Array.): *} f The function to call + * @param {function(T, number, Array): *} f The function to call * for every element. This function takes 3 arguments (the element, the * index and the array). The return value is ignored. * @api @@ -136,7 +136,7 @@ class Collection extends BaseObject { * is mutated, no events will be dispatched by the collection, and the * collection's "length" property won't be in sync with the actual length * of the array. - * @return {!Array.} Array. + * @return {!Array} Array. * @api */ getArray() { diff --git a/src/ol/Feature.js b/src/ol/Feature.js index deca8a3921..69716bdcad 100644 --- a/src/ol/Feature.js +++ b/src/ol/Feature.js @@ -78,7 +78,7 @@ class Feature extends BaseObject { /** * User provided style. * @private - * @type {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} + * @type {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} */ this.style_ = null; @@ -170,7 +170,7 @@ class Feature extends BaseObject { /** * Get the feature's style. Will return what was provided to the * {@link module:ol/Feature~Feature#setStyle} method. - * @return {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} The feature style. + * @return {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} The feature style. * @api */ getStyle() { @@ -225,7 +225,7 @@ class Feature extends BaseObject { * Set the style for the feature. This can be a single style object, an array * of styles, or a function that takes a resolution and returns an array of * styles. If it is `null` the feature has no style (a `null` style). - * @param {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} style Style for this feature. + * @param {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} style Style for this feature. * @api * @fires module:ol/events/Event~Event#event:change */ @@ -273,7 +273,7 @@ class Feature extends BaseObject { * Convert the provided object into a feature style function. Functions passed * through unchanged. Arrays of module:ol/style/Style or single style objects wrapped * in a new feature style function. - * @param {module:ol/style/Style~StyleFunction|!Array.|!module:ol/style/Style} obj + * @param {module:ol/style/Style~StyleFunction|!Array|!module:ol/style/Style} obj * A feature style function, a single style, or an array of styles. * @return {module:ol/style/Style~StyleFunction} A style function. */ @@ -282,7 +282,7 @@ export function createStyleFunction(obj) { return obj; } else { /** - * @type {Array.} + * @type {Array} */ let styles; if (Array.isArray(obj)) { diff --git a/src/ol/Graticule.js b/src/ol/Graticule.js index 916b2e7222..45a59f7bdf 100644 --- a/src/ol/Graticule.js +++ b/src/ol/Graticule.js @@ -27,7 +27,7 @@ const DEFAULT_STROKE_STYLE = new Stroke({ /** * TODO can be configurable - * @type {Array.} + * @type {Array} * @private */ const INTERVALS = [ @@ -200,13 +200,13 @@ class Graticule { this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100; /** - * @type {Array.} + * @type {Array} * @private */ this.meridians_ = []; /** - * @type {Array.} + * @type {Array} * @private */ this.parallels_ = []; @@ -236,13 +236,13 @@ class Graticule { this.projectionCenterLonLat_ = null; /** - * @type {Array.} + * @type {Array} * @private */ this.meridiansLabels_ = null; /** - * @type {Array.} + * @type {Array} * @private */ this.parallelsLabels_ = null; @@ -526,9 +526,9 @@ class Graticule { const centerLat = this.projectionCenterLonLat_[1]; let interval = -1; const target = Math.pow(this.targetSize_ * resolution, 2); - /** @type {Array.} **/ + /** @type {Array} **/ const p1 = []; - /** @type {Array.} **/ + /** @type {Array} **/ const p2 = []; for (let i = 0, ii = INTERVALS.length; i < ii; ++i) { const delta = INTERVALS[i] / 2; @@ -579,7 +579,7 @@ class Graticule { /** * Get the list of meridians. Meridians are lines of equal longitude. - * @return {Array.} The meridians. + * @return {Array} The meridians. * @api */ getMeridians() { @@ -609,7 +609,7 @@ class Graticule { /** * Get the list of parallels. Parallels are lines of equal latitude. - * @return {Array.} The parallels. + * @return {Array} The parallels. * @api */ getParallels() { diff --git a/src/ol/Image.js b/src/ol/Image.js index c9b0578b68..7305e5a678 100644 --- a/src/ol/Image.js +++ b/src/ol/Image.js @@ -58,7 +58,7 @@ class ImageWrapper extends ImageBase { /** * @private - * @type {Array.} + * @type {Array} */ this.imageListenerKeys_ = null; diff --git a/src/ol/ImageTile.js b/src/ol/ImageTile.js index 5de7a12eae..8a476f4ab3 100644 --- a/src/ol/ImageTile.js +++ b/src/ol/ImageTile.js @@ -52,7 +52,7 @@ class ImageTile extends Tile { /** * @private - * @type {Array.} + * @type {Array} */ this.imageListenerKeys_ = null; diff --git a/src/ol/Kinetic.js b/src/ol/Kinetic.js index bff24954a2..d80c34a36c 100644 --- a/src/ol/Kinetic.js +++ b/src/ol/Kinetic.js @@ -38,7 +38,7 @@ class Kinetic { /** * @private - * @type {Array.} + * @type {Array} */ this.points_ = []; diff --git a/src/ol/MapBrowserEventHandler.js b/src/ol/MapBrowserEventHandler.js index cf29d58cff..b90ad9e714 100644 --- a/src/ol/MapBrowserEventHandler.js +++ b/src/ol/MapBrowserEventHandler.js @@ -39,7 +39,7 @@ class MapBrowserEventHandler extends EventTarget { this.dragging_ = false; /** - * @type {!Array.} + * @type {!Array} * @private */ this.dragListenerKeys_ = []; diff --git a/src/ol/Object.js b/src/ol/Object.js index 829bd595cf..df919ec00e 100644 --- a/src/ol/Object.js +++ b/src/ol/Object.js @@ -126,7 +126,7 @@ class BaseObject extends Observable { /** * Get a list of object property names. - * @return {Array.} List of property names. + * @return {Array} List of property names. * @api */ getKeys() { diff --git a/src/ol/Observable.js b/src/ol/Observable.js index 7c68f91b0c..f29bf34044 100644 --- a/src/ol/Observable.js +++ b/src/ol/Observable.js @@ -50,9 +50,9 @@ class Observable extends EventTarget { /** * Listen for a certain type of event. - * @param {string|Array.} type The event type or array of event types. + * @param {string|Array} type The event type or array of event types. * @param {function(?): ?} listener The listener function. - * @return {module:ol/events~EventsKey|Array.} Unique key for the listener. If + * @return {module:ol/events~EventsKey|Array} Unique key for the listener. If * called with an array of event types as the first argument, the return * will be an array of keys. * @api @@ -72,9 +72,9 @@ class Observable extends EventTarget { /** * Listen once for a certain type of event. - * @param {string|Array.} type The event type or array of event types. + * @param {string|Array} type The event type or array of event types. * @param {function(?): ?} listener The listener function. - * @return {module:ol/events~EventsKey|Array.} Unique key for the listener. If + * @return {module:ol/events~EventsKey|Array} Unique key for the listener. If * called with an array of event types as the first argument, the return * will be an array of keys. * @api @@ -94,7 +94,7 @@ class Observable extends EventTarget { /** * Unlisten for a certain type of event. - * @param {string|Array.} type The event type or array of event types. + * @param {string|Array} type The event type or array of event types. * @param {function(?): ?} listener The listener function. * @api */ @@ -113,7 +113,7 @@ class Observable extends EventTarget { /** * Removes an event listener using the key returned by `on()` or `once()`. - * @param {module:ol/events~EventsKey|Array.} key The key returned by `on()` + * @param {module:ol/events~EventsKey|Array} key The key returned by `on()` * or `once()` (or an array of keys). * @api */ diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index 71e95db1a7..4d4dbf1a30 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -15,7 +15,7 @@ import {containsExtent} from './extent.js'; * @property {number|string} [id] Set the overlay id. The overlay id can be used * with the {@link module:ol/Map~Map#getOverlayById} method. * @property {HTMLElement} [element] The overlay element. - * @property {Array.} [offset=[0, 0]] Offsets in pixels used when positioning + * @property {Array} [offset=[0, 0]] Offsets in pixels used when positioning * the overlay. The first element in the * array is the horizontal offset. A positive value shifts the overlay right. * The second element in the array is the vertical offset. A positive value @@ -248,12 +248,12 @@ class Overlay extends BaseObject { /** * Get the offset of this overlay. - * @return {Array.} The offset. + * @return {Array} The offset. * @observable * @api */ getOffset() { - return /** @type {Array.} */ (this.get(Property.OFFSET)); + return /** @type {Array} */ (this.get(Property.OFFSET)); } /** @@ -371,7 +371,7 @@ class Overlay extends BaseObject { /** * Set the offset for this overlay. - * @param {Array.} offset Offset. + * @param {Array} offset Offset. * @observable * @api */ diff --git a/src/ol/PluggableMap.js b/src/ol/PluggableMap.js index 1b70c30bad..20a5691b71 100644 --- a/src/ol/PluggableMap.js +++ b/src/ol/PluggableMap.js @@ -42,14 +42,14 @@ import {create as createTransform, apply as applyTransform} from './transform.js * @property {module:ol/coordinate~Coordinate} focus * @property {number} index * @property {Object.} layerStates - * @property {Array.} layerStatesArray + * @property {Array} layerStatesArray * @property {module:ol/transform~Transform} pixelToCoordinateTransform - * @property {Array.} postRenderFunctions + * @property {Array} postRenderFunctions * @property {module:ol/size~Size} size * @property {!Object.} skippedFeatureUids * @property {module:ol/TileQueue} tileQueue * @property {Object.>} usedTiles - * @property {Array.} viewHints + * @property {Array} viewHints * @property {!Object.>} wantedTiles */ @@ -85,12 +85,12 @@ import {create as createTransform, apply as applyTransform} from './transform.js /** * Object literal with config options for the map. * @typedef {Object} MapOptions - * @property {module:ol/Collection.|Array.} [controls] + * @property {module:ol/Collection.|Array} [controls] * Controls initially added to the map. If not specified, * {@link module:ol/control/util~defaults} is used. * @property {number} [pixelRatio=window.devicePixelRatio] The ratio between * physical pixels and device-independent pixels (dips) on the device. - * @property {module:ol/Collection.|Array.} [interactions] + * @property {module:ol/Collection.|Array} [interactions] * Interactions that are initially added to the map. If not specified, * {@link module:ol/interaction~defaults} is used. * @property {HTMLElement|Document|string} [keyboardEventTarget] The element to @@ -101,7 +101,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js * map target (i.e. the user-provided div for the map). If this is not * `document`, the target element needs to be focused for key events to be * emitted, requiring that the target element has a `tabindex` attribute. - * @property {Array.|module:ol/Collection.} [layers] + * @property {Array|module:ol/Collection.} [layers] * Layers. If this is not defined, a map with no layers will be rendered. Note * that layers are rendered in the order supplied, so if you want, for example, * a vector layer to appear on top of a tile layer, it must come after the tile @@ -118,7 +118,7 @@ import {create as createTransform, apply as applyTransform} from './transform.js * @property {number} [moveTolerance=1] The minimum distance in pixels the * cursor must move to be detected as a map move event instead of a click. * Increasing this value can make it easier to click on the map. - * @property {module:ol/Collection.|Array.} [overlays] + * @property {module:ol/Collection.|Array} [overlays] * Overlays initially added to the map. By default, no overlays are added. * @property {HTMLElement|string} [target] The container for the map, either the * element itself or the `id` of the element. If not specified at construction @@ -236,7 +236,7 @@ class PluggableMap extends BaseObject { /** * @private - * @type {Array.} + * @type {Array} */ this.layerGroupPropertyListenerKeys_ = null; @@ -301,7 +301,7 @@ class PluggableMap extends BaseObject { /** * @private - * @type {Array.} + * @type {Array} */ this.keyHandlerKeys_ = null; @@ -354,7 +354,7 @@ class PluggableMap extends BaseObject { /** * @private - * @type {!Array.} + * @type {!Array} */ this.postRenderFunctions_ = []; @@ -577,7 +577,7 @@ class PluggableMap extends BaseObject { * Get all features that intersect a pixel on the viewport. * @param {module:ol/pixel~Pixel} pixel Pixel. * @param {module:ol/PluggableMap~AtPixelOptions=} opt_options Optional options. - * @return {Array.} The detected features or + * @return {Array} The detected features or * `null` if none were found. * @api */ diff --git a/src/ol/VectorImageTile.js b/src/ol/VectorImageTile.js index f732460b32..e11eb664b4 100644 --- a/src/ol/VectorImageTile.js +++ b/src/ol/VectorImageTile.js @@ -75,7 +75,7 @@ class VectorImageTile extends Tile { /** * Keys of source tiles used by this tile. Use with {@link #getTile}. - * @type {Array.} + * @type {Array} */ this.tileKeys = []; @@ -95,12 +95,12 @@ class VectorImageTile extends Tile { this.wrappedTileCoord = urlTileCoord; /** - * @type {Array.} + * @type {Array} */ this.loadListenerKeys_ = []; /** - * @type {Array.} + * @type {Array} */ this.sourceTileListenerKeys_ = []; diff --git a/src/ol/VectorTile.js b/src/ol/VectorTile.js index 545228da8e..e18bfcf506 100644 --- a/src/ol/VectorTile.js +++ b/src/ol/VectorTile.js @@ -51,7 +51,7 @@ class VectorTile extends Tile { /** * @private - * @type {Array.} + * @type {Array} */ this.features_ = null; @@ -120,7 +120,7 @@ class VectorTile extends Tile { /** * Get the features for this tile. Geometries will be in the projection returned * by {@link module:ol/VectorTile~VectorTile#getProjection}. - * @return {Array.} Features. + * @return {Array} Features. * @api */ getFeatures() { @@ -166,7 +166,7 @@ class VectorTile extends Tile { /** * Handler for successful tile load. - * @param {Array.} features The loaded features. + * @param {Array} features The loaded features. * @param {module:ol/proj/Projection} dataProjection Data projection. * @param {module:ol/extent~Extent} extent Extent. */ @@ -202,7 +202,7 @@ class VectorTile extends Tile { /** * Function for use in an {@link module:ol/source/VectorTile~VectorTile}'s `tileLoadFunction`. * Sets the features for the tile. - * @param {Array.} features Features. + * @param {Array} features Features. * @api */ setFeatures(features) { diff --git a/src/ol/View.js b/src/ol/View.js index e4ff15c92b..7d22d8fc99 100644 --- a/src/ol/View.js +++ b/src/ol/View.js @@ -56,7 +56,7 @@ import Units from './proj/Units.js'; * @property {module:ol/size~Size} [size] The size in pixels of the box to fit * the extent into. Default is the current size of the first map in the DOM that * uses this view, or `[100, 100]` if no such map is found. - * @property {!Array.} [padding=[0, 0, 0, 0]] Padding (in pixels) to be + * @property {!Array} [padding=[0, 0, 0, 0]] Padding (in pixels) to be * cleared inside the view. Values in the array are top, right, bottom and left * padding. * @property {boolean} [constrainResolution=true] Constrain the resolution. @@ -121,7 +121,7 @@ import Units from './proj/Units.js'; * alternative to setting this is to set `zoom`. Layer sources will not be * fetched if neither this nor `zoom` are defined, but they can be set later * with {@link #setZoom} or {@link #setResolution}. - * @property {Array.} [resolutions] Resolutions to determine the + * @property {Array} [resolutions] Resolutions to determine the * resolution constraint. If set the `maxResolution`, `minResolution`, * `minZoom`, `maxZoom`, and `zoomFactor` options are ignored. * @property {number} [rotation=0] The initial rotation for the view in radians @@ -238,13 +238,13 @@ class View extends BaseObject { /** * @private - * @type {Array.} + * @type {Array} */ this.hints_ = [0, 0]; /** * @private - * @type {Array.>} + * @type {Array>} */ this.animations_ = []; @@ -301,7 +301,7 @@ class View extends BaseObject { /** * @private - * @type {Array.|undefined} + * @type {Array|undefined} */ this.resolutions_ = options.resolutions; @@ -710,8 +710,8 @@ class View extends BaseObject { } /** - * @param {Array.=} opt_hints Destination array. - * @return {Array.} Hint. + * @param {Array=} opt_hints Destination array. + * @return {Array} Hint. */ getHints(opt_hints) { if (opt_hints !== undefined) { @@ -821,7 +821,7 @@ class View extends BaseObject { /** * Get the resolutions for the view. This returns the array of resolutions * passed to the constructor of the View, or undefined if none were given. - * @return {Array.|undefined} The resolutions of the view. + * @return {Array|undefined} The resolutions of the view. * @api */ getResolutions() { diff --git a/src/ol/array.js b/src/ol/array.js index 9491403cf6..47dc5d0876 100644 --- a/src/ol/array.js +++ b/src/ol/array.js @@ -7,7 +7,7 @@ * Performs a binary search on the provided sorted list and returns the index of the item if found. If it can't be found it'll return -1. * https://github.com/darkskyapp/binary-search * - * @param {Array.<*>} haystack Items to search through. + * @param {Array<*>} haystack Items to search through. * @param {*} needle The item to look for. * @param {Function=} opt_comparator Comparator function. * @return {number} The index of the item if found, -1 if not. @@ -53,7 +53,7 @@ export function numberSafeCompareFunction(a, b) { /** * Whether the array contains the given object. - * @param {Array.<*>} arr The array to test for the presence of the element. + * @param {Array<*>} arr The array to test for the presence of the element. * @param {*} obj The object for which to test. * @return {boolean} The object is in the array. */ @@ -63,7 +63,7 @@ export function includes(arr, obj) { /** - * @param {Array.} arr Array. + * @param {Array} arr Array. * @param {number} target Target. * @param {number} direction 0 means return the nearest, > 0 * means return the largest nearest, < 0 means return the @@ -109,7 +109,7 @@ export function linearFindNearest(arr, target, direction) { /** - * @param {Array.<*>} arr Array. + * @param {Array<*>} arr Array. * @param {number} begin Begin index. * @param {number} end End index. */ @@ -125,8 +125,8 @@ export function reverseSubArray(arr, begin, end) { /** - * @param {Array.} arr The array to modify. - * @param {!Array.|VALUE} data The elements or arrays of elements to add to arr. + * @param {Array} arr The array to modify. + * @param {!Array|VALUE} data The elements or arrays of elements to add to arr. * @template VALUE */ export function extend(arr, data) { @@ -139,7 +139,7 @@ export function extend(arr, data) { /** - * @param {Array.} arr The array to modify. + * @param {Array} arr The array to modify. * @param {VALUE} obj The element to remove. * @template VALUE * @return {boolean} If the element was removed. @@ -155,7 +155,7 @@ export function remove(arr, obj) { /** - * @param {Array.} arr The array to search in. + * @param {Array} arr The array to search in. * @param {function(VALUE, number, ?) : boolean} func The function to compare. * @template VALUE * @return {VALUE|null} The element found or null. @@ -194,7 +194,7 @@ export function equals(arr1, arr2) { /** - * @param {Array.<*>} arr The array to sort (modifies original). + * @param {Array<*>} arr The array to sort (modifies original). * @param {Function} compareFnc Comparison function. */ export function stableSort(arr, compareFnc) { @@ -214,7 +214,7 @@ export function stableSort(arr, compareFnc) { /** - * @param {Array.<*>} arr The array to search in. + * @param {Array<*>} arr The array to search in. * @param {Function} func Comparison function. * @return {number} Return index. */ @@ -229,7 +229,7 @@ export function findIndex(arr, func) { /** - * @param {Array.<*>} arr The array to test. + * @param {Array<*>} arr The array to test. * @param {Function=} opt_func Comparison function. * @param {boolean=} opt_strict Strictly sorted (default false). * @return {boolean} Return index. diff --git a/src/ol/color.js b/src/ol/color.js index 3dbcd4bd8b..b0c856d37a 100644 --- a/src/ol/color.js +++ b/src/ol/color.js @@ -10,7 +10,7 @@ import {clamp} from './math.js'; * red, green, and blue should be integers in the range 0..255 inclusive. * alpha should be a float in the range 0..1 inclusive. If no alpha value is * given then `1` will be used. - * @typedef {Array.} Color + * @typedef {Array} Color * @api */ diff --git a/src/ol/control/Attribution.js b/src/ol/control/Attribution.js index 9b610883b1..9e3afdace6 100644 --- a/src/ol/control/Attribution.js +++ b/src/ol/control/Attribution.js @@ -131,7 +131,7 @@ class Attribution extends Control { /** * A list of currently rendered resolutions. - * @type {Array.} + * @type {Array} * @private */ this.renderedAttributions_ = []; @@ -147,7 +147,7 @@ class Attribution extends Control { /** * Get a list of visible attributions. * @param {module:ol/PluggableMap~FrameState} frameState Frame state. - * @return {Array.} Attributions. + * @return {Array} Attributions. * @private */ getSourceAttributions_(frameState) { @@ -159,7 +159,7 @@ class Attribution extends Control { /** * A list of visible attributions. - * @type {Array.} + * @type {Array} */ const visibleAttributions = []; diff --git a/src/ol/control/Control.js b/src/ol/control/Control.js index 873779a2c4..ab9eefd45a 100644 --- a/src/ol/control/Control.js +++ b/src/ol/control/Control.js @@ -74,7 +74,7 @@ class Control extends BaseObject { /** * @protected - * @type {!Array.} + * @type {!Array} */ this.listenerKeys = []; diff --git a/src/ol/control/OverviewMap.js b/src/ol/control/OverviewMap.js index 8e9379cb4f..b06b9079ce 100644 --- a/src/ol/control/OverviewMap.js +++ b/src/ol/control/OverviewMap.js @@ -44,7 +44,7 @@ const MIN_RATIO = 0.1; * @property {boolean} [collapsible=true] Whether the control can be collapsed or not. * @property {string|HTMLElement} [label='»'] Text label to use for the collapsed * overviewmap button. Instead of text, also an element (e.g. a `span` element) can be used. - * @property {Array.|module:ol/Collection.} [layers] + * @property {Array|module:ol/Collection.} [layers] * Layers for the overview map. If not set, then all main map layers are used * instead. * @property {function(module:ol/MapEvent)} [render] Function called when the control diff --git a/src/ol/control/ScaleLine.js b/src/ol/control/ScaleLine.js index ffb86aca12..154c6df9ae 100644 --- a/src/ol/control/ScaleLine.js +++ b/src/ol/control/ScaleLine.js @@ -31,7 +31,7 @@ export const Units = { /** * @const - * @type {Array.} + * @type {Array} */ const LEADING_DIGITS = [1, 2, 5]; diff --git a/src/ol/coordinate.js b/src/ol/coordinate.js index b82c40762f..cc8353cc13 100644 --- a/src/ol/coordinate.js +++ b/src/ol/coordinate.js @@ -7,7 +7,7 @@ import {padNumber} from './string.js'; /** * An array of numbers representing an xy coordinate. Example: `[16, 48]`. - * @typedef {Array.} Coordinate + * @typedef {Array} Coordinate * @api */ @@ -82,7 +82,7 @@ export function closestOnCircle(coordinate, circle) { * is outside the segment. * * @param {module:ol/coordinate~Coordinate} coordinate The coordinate. - * @param {Array.} segment The two coordinates + * @param {Array} segment The two coordinates * of the segment. * @return {module:ol/coordinate~Coordinate} The foot of the perpendicular of * the coordinate to the segment. @@ -328,7 +328,7 @@ export function distance(coord1, coord2) { * Calculate the squared distance from a coordinate to a line segment. * * @param {module:ol/coordinate~Coordinate} coordinate Coordinate of the point. - * @param {Array.} segment Line segment (2 + * @param {Array} segment Line segment (2 * coordinates). * @return {number} Squared distance from the point to the line segment. */ diff --git a/src/ol/events.js b/src/ol/events.js index fdc5d93e24..f67b7d0a65 100644 --- a/src/ol/events.js +++ b/src/ol/events.js @@ -75,7 +75,7 @@ export function findListener(listeners, listener, opt_this, opt_setDeleteIndex) /** * @param {module:ol/events/EventTarget~EventTargetLike} target Target. * @param {string} type Type. - * @return {Array.|undefined} Listeners. + * @return {Array|undefined} Listeners. */ export function getListeners(target, type) { const listenerMap = target.ol_lm; @@ -87,7 +87,7 @@ export function getListeners(target, type) { * Get the lookup of listeners. If one does not exist on the target, it is * created. * @param {module:ol/events/EventTarget~EventTargetLike} target Target. - * @return {!Object.>} Map of + * @return {!Object.>} Map of * listeners by event type. */ function getListenerMap(target) { diff --git a/src/ol/events/EventTarget.js b/src/ol/events/EventTarget.js index c23ce69680..be1f631ee8 100644 --- a/src/ol/events/EventTarget.js +++ b/src/ol/events/EventTarget.js @@ -46,7 +46,7 @@ class EventTarget extends Disposable { /** * @private - * @type {!Object.>} + * @type {!Object.>} */ this.listeners_ = {}; @@ -122,7 +122,7 @@ class EventTarget extends Disposable { * order that they will be called in. * * @param {string} type Type. - * @return {Array.} Listeners. + * @return {Array} Listeners. */ getListeners(type) { return this.listeners_[type]; diff --git a/src/ol/extent.js b/src/ol/extent.js index 6cf4d667da..66ef348414 100644 --- a/src/ol/extent.js +++ b/src/ol/extent.js @@ -8,14 +8,14 @@ import Relationship from './extent/Relationship.js'; /** * An array of numbers representing an extent: `[minx, miny, maxx, maxy]`. - * @typedef {Array.} Extent + * @typedef {Array} Extent * @api */ /** * Build an extent that includes all given coordinates. * - * @param {Array.} coordinates Coordinates. + * @param {Array} coordinates Coordinates. * @return {module:ol/extent~Extent} Bounding extent. * @api */ @@ -29,8 +29,8 @@ export function boundingExtent(coordinates) { /** - * @param {Array.} xs Xs. - * @param {Array.} ys Ys. + * @param {Array} xs Xs. + * @param {Array} ys Ys. * @param {module:ol/extent~Extent=} opt_extent Destination extent. * @private * @return {module:ol/extent~Extent} Extent. @@ -249,7 +249,7 @@ export function createOrUpdateFromCoordinate(coordinate, opt_extent) { /** - * @param {Array.} coordinates Coordinates. + * @param {Array} coordinates Coordinates. * @param {module:ol/extent~Extent=} opt_extent Extent. * @return {module:ol/extent~Extent} Extent. */ @@ -260,7 +260,7 @@ export function createOrUpdateFromCoordinates(coordinates, opt_extent) { /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -273,7 +273,7 @@ export function createOrUpdateFromFlatCoordinates(flatCoordinates, offset, end, } /** - * @param {Array.>} rings Rings. + * @param {Array>} rings Rings. * @param {module:ol/extent~Extent=} opt_extent Extent. * @return {module:ol/extent~Extent} Extent. */ @@ -342,7 +342,7 @@ export function extendCoordinate(extent, coordinate) { /** * @param {module:ol/extent~Extent} extent Extent. - * @param {Array.} coordinates Coordinates. + * @param {Array} coordinates Coordinates. * @return {module:ol/extent~Extent} Extent. */ export function extendCoordinates(extent, coordinates) { @@ -355,7 +355,7 @@ export function extendCoordinates(extent, coordinates) { /** * @param {module:ol/extent~Extent} extent Extent. - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -371,7 +371,7 @@ export function extendFlatCoordinates(extent, flatCoordinates, offset, end, stri /** * @param {module:ol/extent~Extent} extent Extent. - * @param {Array.>} rings Rings. + * @param {Array>} rings Rings. * @return {module:ol/extent~Extent} Extent. */ export function extendRings(extent, rings) { diff --git a/src/ol/featureloader.js b/src/ol/featureloader.js index b1e49781f5..e1d064e585 100644 --- a/src/ol/featureloader.js +++ b/src/ol/featureloader.js @@ -39,7 +39,7 @@ import FormatType from './format/FormatType.js'; /** * @param {string|module:ol/featureloader~FeatureUrlFunction} url Feature URL service. * @param {module:ol/format/Feature} format Feature format. - * @param {function(this:module:ol/VectorTile, Array., module:ol/proj/Projection, module:ol/extent~Extent)|function(this:module:ol/source/Vector, Array.)} success + * @param {function(this:module:ol/VectorTile, Array, module:ol/proj/Projection, module:ol/extent~Extent)|function(this:module:ol/source/Vector, Array)} success * Function called with the loaded features and optionally with the data * projection. Called with the vector tile or source as `this`. * @param {function(this:module:ol/VectorTile)|function(this:module:ol/source/Vector)} failure @@ -118,7 +118,7 @@ export function loadFeaturesXhr(url, format, success, failure) { export function xhr(url, format) { return loadFeaturesXhr(url, format, /** - * @param {Array.} features The loaded features. + * @param {Array} features The loaded features. * @param {module:ol/proj/Projection} dataProjection Data * projection. * @this {module:ol/source/Vector} diff --git a/src/ol/format/EsriJSON.js b/src/ol/format/EsriJSON.js index 7c5e4fc080..f2e9c5a64c 100644 --- a/src/ol/format/EsriJSON.js +++ b/src/ol/format/EsriJSON.js @@ -108,7 +108,7 @@ class EsriJSON extends JSONFeature { const options = opt_options ? opt_options : {}; if (esriJSONObject.features) { const esriJSONFeatureCollection = /** @type {EsriJSONFeatureCollection} */ (object); - /** @type {Array.} */ + /** @type {Array} */ const features = []; const esriJSONFeatures = esriJSONFeatureCollection.features; options.idField = object.objectIdFieldName; @@ -188,7 +188,7 @@ class EsriJSON extends JSONFeature { /** * Encode an array of features as a EsriJSON object. * - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @return {Object} EsriJSON Object. * @override @@ -252,9 +252,9 @@ function readGeometry(object, opt_options) { * Checks if any polygons in this array contain any other polygons in this * array. It is used for checking for holes. * Logic inspired by: https://github.com/Esri/terraformer-arcgis-parser - * @param {Array.>>} rings Rings. + * @param {Array>>} rings Rings. * @param {module:ol/geom/GeometryLayout} layout Geometry layout. - * @return {Array.>>} Transformed rings. + * @return {Array>>} Transformed rings. */ function convertRings(rings, layout) { const flatRing = []; @@ -376,7 +376,7 @@ function readMultiPointGeometry(object) { function readMultiPolygonGeometry(object) { const layout = getGeometryLayout(object); return new MultiPolygon( - /** @type {Array.>>>} */(object.rings), + /** @type {Array>>>} */(object.rings), layout); } diff --git a/src/ol/format/Feature.js b/src/ol/format/Feature.js index 0f2310d96f..2c93833cd8 100644 --- a/src/ol/format/Feature.js +++ b/src/ol/format/Feature.js @@ -141,7 +141,7 @@ class FeatureFormat { * @abstract * @param {Document|Node|ArrayBuffer|Object|string} source Source. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @return {Array.} Features. + * @return {Array} Features. */ readFeatures(source, opt_options) {} @@ -178,7 +178,7 @@ class FeatureFormat { * Encode an array of features in this format. * * @abstract - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @return {string} Result. */ @@ -234,8 +234,8 @@ export function transformWithOptions(geometry, write, opt_options) { const power = Math.pow(10, opt_options.decimals); // if decimals option on write, round each coordinate appropriately /** - * @param {Array.} coordinates Coordinates. - * @return {Array.} Transformed coordinates. + * @param {Array} coordinates Coordinates. + * @return {Array} Transformed coordinates. */ const transform = function(coordinates) { for (let i = 0, ii = coordinates.length; i < ii; ++i) { diff --git a/src/ol/format/GML.js b/src/ol/format/GML.js index f7ef19052b..cb262fa019 100644 --- a/src/ol/format/GML.js +++ b/src/ol/format/GML.js @@ -20,7 +20,7 @@ const GML = GML3; * Encode an array of features in GML 3.1.1 Simple Features. * * @function - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @return {string} Result. * @api @@ -32,7 +32,7 @@ GML.prototype.writeFeatures; * Encode an array of features in the GML 3.1.1 format as an XML node. * * @function - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @return {Node} Node. * @api diff --git a/src/ol/format/GML2.js b/src/ol/format/GML2.js index a6baf61c32..927d0d666d 100644 --- a/src/ol/format/GML2.js +++ b/src/ol/format/GML2.js @@ -63,9 +63,9 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private - * @return {Array.|undefined} Flat coordinates. + * @return {Array|undefined} Flat coordinates. */ readFlatCoordinates_(node, objectStack) { const s = getAllTextContent(node, false).replace(/^\s*|\s*$/g, ''); @@ -96,12 +96,12 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private * @return {module:ol/extent~Extent|undefined} Envelope. */ readBox_(node, objectStack) { - /** @type {Array.} */ + /** @type {Array} */ const flatCoordinates = pushParseAndPop([null], this.BOX_PARSERS_, node, objectStack, this); return createOrUpdate(flatCoordinates[1][0], @@ -111,15 +111,15 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ innerBoundaryIsParser_(node, objectStack) { - /** @type {Array.|undefined} */ + /** @type {Array|undefined} */ const flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this); if (flatLinearRing) { - const flatLinearRings = /** @type {Array.>} */ + const flatLinearRings = /** @type {Array>} */ (objectStack[objectStack.length - 1]); flatLinearRings.push(flatLinearRing); } @@ -127,15 +127,15 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ outerBoundaryIsParser_(node, objectStack) { - /** @type {Array.|undefined} */ + /** @type {Array|undefined} */ const flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this); if (flatLinearRing) { - const flatLinearRings = /** @type {Array.>} */ + const flatLinearRings = /** @type {Array>} */ (objectStack[objectStack.length - 1]); flatLinearRings[0] = flatLinearRing; } @@ -144,7 +144,7 @@ class GML2 extends GMLBase { /** * @const * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node|undefined} Node. * @private @@ -174,7 +174,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/Feature} feature Feature. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ writeFeatureElement(node, feature, objectStack) { const fid = feature.getId(); @@ -220,7 +220,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LineString} geometry LineString geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeCurveOrLineString_(node, geometry, objectStack) { @@ -245,7 +245,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LineString} line LineString geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeLineStringOrCurveMember_(node, line, objectStack) { @@ -259,7 +259,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/MultiLineString} geometry MultiLineString geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeMultiCurveOrLineString_(node, geometry, objectStack) { @@ -280,7 +280,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Geometry|module:ol/extent~Extent} geometry Geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ writeGeometryElement(node, geometry, objectStack) { const context = /** @type {module:ol/format/Feature~WriteOptions} */ (objectStack[objectStack.length - 1]); @@ -320,7 +320,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LineString|module:ol/geom/LinearRing} value Geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeCoordinates_(node, value, objectStack) { @@ -341,7 +341,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LineString} line LineString geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeCurveSegments_(node, line, objectStack) { @@ -353,7 +353,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Polygon} geometry Polygon geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeSurfaceOrPolygon_(node, geometry, objectStack) { @@ -380,7 +380,7 @@ class GML2 extends GMLBase { /** * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node} Node. * @private @@ -399,7 +399,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Polygon} polygon Polygon geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeSurfacePatches_(node, polygon, objectStack) { @@ -411,7 +411,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LinearRing} ring LinearRing geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeRing_(node, ring, objectStack) { @@ -421,7 +421,7 @@ class GML2 extends GMLBase { } /** - * @param {Array.} point Point geometry. + * @param {Array} point Point geometry. * @param {string=} opt_srsName Optional srsName * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not. * @return {string} The coords string. @@ -447,7 +447,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Point} geometry Point geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writePoint_(node, geometry, objectStack) { @@ -467,7 +467,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/MultiPoint} geometry MultiPoint geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeMultiPoint_(node, geometry, objectStack) { @@ -487,7 +487,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Point} point Point geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writePointMember_(node, point, objectStack) { @@ -499,7 +499,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LinearRing} geometry LinearRing geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeLinearRing_(node, geometry, objectStack) { @@ -516,7 +516,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/MultiPolygon} geometry MultiPolygon geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeMultiSurfaceOrPolygon_(node, geometry, objectStack) { @@ -537,7 +537,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Polygon} polygon Polygon geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeSurfaceOrPolygonMember_(node, polygon, objectStack) { @@ -552,7 +552,7 @@ class GML2 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/extent~Extent} extent Extent. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeEnvelope(node, extent, objectStack) { @@ -573,7 +573,7 @@ class GML2 extends GMLBase { /** * @const * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node|undefined} Node. * @private diff --git a/src/ol/format/GML3.js b/src/ol/format/GML3.js index 5fd31cfae0..e782ce048f 100644 --- a/src/ol/format/GML3.js +++ b/src/ol/format/GML3.js @@ -103,12 +103,12 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private * @return {module:ol/geom/MultiLineString|undefined} MultiLineString. */ readMultiCurve_(node, objectStack) { - /** @type {Array.} */ + /** @type {Array} */ const lineStrings = pushParseAndPop([], this.MULTICURVE_PARSERS_, node, objectStack, this); if (lineStrings) { @@ -121,12 +121,12 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private * @return {module:ol/geom/MultiPolygon|undefined} MultiPolygon. */ readMultiSurface_(node, objectStack) { - /** @type {Array.} */ + /** @type {Array} */ const polygons = pushParseAndPop([], this.MULTISURFACE_PARSERS_, node, objectStack, this); if (polygons) { @@ -136,7 +136,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ curveMemberParser_(node, objectStack) { @@ -145,7 +145,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ surfaceMemberParser_(node, objectStack) { @@ -155,9 +155,9 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private - * @return {Array.<(Array.)>|undefined} flat coordinates. + * @return {Array<(Array)>|undefined} flat coordinates. */ readPatch_(node, objectStack) { return pushParseAndPop([null], @@ -166,9 +166,9 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private - * @return {Array.|undefined} flat coordinates. + * @return {Array|undefined} flat coordinates. */ readSegment_(node, objectStack) { return pushParseAndPop([null], @@ -177,9 +177,9 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private - * @return {Array.<(Array.)>|undefined} flat coordinates. + * @return {Array<(Array)>|undefined} flat coordinates. */ readPolygonPatch_(node, objectStack) { return pushParseAndPop([null], @@ -188,9 +188,9 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private - * @return {Array.|undefined} flat coordinates. + * @return {Array|undefined} flat coordinates. */ readLineStringSegment_(node, objectStack) { return pushParseAndPop([null], @@ -200,15 +200,15 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ interiorParser_(node, objectStack) { - /** @type {Array.|undefined} */ + /** @type {Array|undefined} */ const flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this); if (flatLinearRing) { - const flatLinearRings = /** @type {Array.>} */ + const flatLinearRings = /** @type {Array>} */ (objectStack[objectStack.length - 1]); flatLinearRings.push(flatLinearRing); } @@ -216,15 +216,15 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ exteriorParser_(node, objectStack) { - /** @type {Array.|undefined} */ + /** @type {Array|undefined} */ const flatLinearRing = pushParseAndPop(undefined, this.RING_PARSERS, node, objectStack, this); if (flatLinearRing) { - const flatLinearRings = /** @type {Array.>} */ + const flatLinearRings = /** @type {Array>} */ (objectStack[objectStack.length - 1]); flatLinearRings[0] = flatLinearRing; } @@ -232,12 +232,12 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private * @return {module:ol/geom/Polygon|undefined} Polygon. */ readSurface_(node, objectStack) { - /** @type {Array.>} */ + /** @type {Array>} */ const flatLinearRings = pushParseAndPop([null], this.SURFACE_PARSERS_, node, objectStack, this); if (flatLinearRings && flatLinearRings[0]) { @@ -256,12 +256,12 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private * @return {module:ol/geom/LineString|undefined} LineString. */ readCurve_(node, objectStack) { - /** @type {Array.} */ + /** @type {Array} */ const flatCoordinates = pushParseAndPop([null], this.CURVE_PARSERS_, node, objectStack, this); if (flatCoordinates) { @@ -274,12 +274,12 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private * @return {module:ol/extent~Extent|undefined} Envelope. */ readEnvelope_(node, objectStack) { - /** @type {Array.} */ + /** @type {Array} */ const flatCoordinates = pushParseAndPop([null], this.ENVELOPE_PARSERS_, node, objectStack, this); return createOrUpdate(flatCoordinates[1][0], @@ -289,14 +289,14 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private - * @return {Array.|undefined} Flat coordinates. + * @return {Array|undefined} Flat coordinates. */ readFlatPos_(node, objectStack) { let s = getAllTextContent(node, false); const re = /^\s*([+\-]?\d*\.?\d+(?:[eE][+\-]?\d+)?)\s*/; - /** @type {Array.} */ + /** @type {Array} */ const flatCoordinates = []; let m; while ((m = re.exec(s))) { @@ -334,9 +334,9 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private - * @return {Array.|undefined} Flat coordinates. + * @return {Array|undefined} Flat coordinates. */ readFlatPosList_(node, objectStack) { const s = getAllTextContent(node, false).replace(/^\s*|\s*$/g, ''); @@ -381,7 +381,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Point} value Point geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writePos_(node, value, objectStack) { @@ -411,7 +411,7 @@ class GML3 extends GMLBase { } /** - * @param {Array.} point Point geometry. + * @param {Array} point Point geometry. * @param {string=} opt_srsName Optional srsName * @param {boolean=} opt_hasZ whether the geometry has a Z coordinate (is 3D) or not. * @return {string} The coords string. @@ -437,7 +437,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LineString|module:ol/geom/LinearRing} value Geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writePosList_(node, value, objectStack) { @@ -461,7 +461,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Point} geometry Point geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writePoint_(node, geometry, objectStack) { @@ -478,7 +478,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/extent~Extent} extent Extent. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ writeEnvelope(node, extent, objectStack) { const context = objectStack[objectStack.length - 1]; @@ -498,7 +498,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LinearRing} geometry LinearRing geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeLinearRing_(node, geometry, objectStack) { @@ -514,7 +514,7 @@ class GML3 extends GMLBase { /** * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node} Node. * @private @@ -533,7 +533,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Polygon} geometry Polygon geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeSurfaceOrPolygon_(node, geometry, objectStack) { @@ -561,7 +561,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LineString} geometry LineString geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeCurveOrLineString_(node, geometry, objectStack) { @@ -586,7 +586,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/MultiPolygon} geometry MultiPolygon geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeMultiSurfaceOrPolygon_(node, geometry, objectStack) { @@ -607,7 +607,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/MultiPoint} geometry MultiPoint geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeMultiPoint_(node, geometry, objectStack) { @@ -627,7 +627,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/MultiLineString} geometry MultiLineString geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeMultiCurveOrLineString_(node, geometry, objectStack) { @@ -648,7 +648,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LinearRing} ring LinearRing geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeRing_(node, ring, objectStack) { @@ -660,7 +660,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Polygon} polygon Polygon geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeSurfaceOrPolygonMember_(node, polygon, objectStack) { @@ -675,7 +675,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Point} point Point geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writePointMember_(node, point, objectStack) { @@ -687,7 +687,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LineString} line LineString geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeLineStringOrCurveMember_(node, line, objectStack) { @@ -701,7 +701,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Polygon} polygon Polygon geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeSurfacePatches_(node, polygon, objectStack) { @@ -713,7 +713,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/LineString} line LineString geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. * @private */ writeCurveSegments_(node, line, objectStack) { @@ -726,7 +726,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/geom/Geometry|module:ol/extent~Extent} geometry Geometry. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ writeGeometryElement(node, geometry, objectStack) { const context = /** @type {module:ol/format/Feature~WriteOptions} */ (objectStack[objectStack.length - 1]); @@ -752,7 +752,7 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. * @param {module:ol/Feature} feature Feature. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ writeFeatureElement(node, feature, objectStack) { const fid = feature.getId(); @@ -797,8 +797,8 @@ class GML3 extends GMLBase { /** * @param {Node} node Node. - * @param {Array.} features Features. - * @param {Array.<*>} objectStack Node stack. + * @param {Array} features Features. + * @param {Array<*>} objectStack Node stack. * @private */ writeFeatureMembers_(node, features, objectStack) { @@ -821,7 +821,7 @@ class GML3 extends GMLBase { /** * @const * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node|undefined} Node. * @private @@ -835,7 +835,7 @@ class GML3 extends GMLBase { /** * @const * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node|undefined} Node. * @private @@ -890,7 +890,7 @@ class GML3 extends GMLBase { /** * Encode an array of features in the GML 3.1.1 format as an XML node. * - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @return {Node} Node. * @override @@ -1100,7 +1100,7 @@ GML3.prototype.SEGMENTS_PARSERS_ = { * Encode an array of features in GML 3.1.1 Simple Features. * * @function - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @return {string} Result. * @api diff --git a/src/ol/format/GMLBase.js b/src/ol/format/GMLBase.js index 2892f23f52..ef92fd97d8 100644 --- a/src/ol/format/GMLBase.js +++ b/src/ol/format/GMLBase.js @@ -52,7 +52,7 @@ const ONLY_WHITESPACE_RE = /^[\s\xa0]*$/; * feature namespaces themselves. So for instance there might be a featureType * item `topp:states` in the `featureType` array and then there will be a key * `topp` in the featureNS object with value `http://www.openplans.org/topp`. - * @property {Array.|string} [featureType] Feature type(s) to parse. + * @property {Array|string} [featureType] Feature type(s) to parse. * If multiple feature types need to be configured * which come from different feature namespaces, `featureNS` will be an object * with the keys being the prefixes used in the entries of featureType array. @@ -96,7 +96,7 @@ class GMLBase extends XMLFeature { /** * @protected - * @type {Array.|string|undefined} + * @type {Array|string|undefined} */ this.featureType = options.featureType; @@ -131,8 +131,8 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. - * @return {Array. | undefined} Features. + * @param {Array<*>} objectStack Object stack. + * @return {Array | undefined} Features. */ readFeaturesInternal(node, objectStack) { const localName = node.localName; @@ -219,7 +219,7 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/Geometry|undefined} Geometry. */ readGeometryElement(node, objectStack) { @@ -239,7 +239,7 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/Feature} Feature. */ readFeatureElement(node, objectStack) { @@ -280,7 +280,7 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/Point|undefined} Point. */ readPoint(node, objectStack) { @@ -292,11 +292,11 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/MultiPoint|undefined} MultiPoint. */ readMultiPoint(node, objectStack) { - /** @type {Array.>} */ + /** @type {Array>} */ const coordinates = pushParseAndPop([], this.MULTIPOINT_PARSERS_, node, objectStack, this); if (coordinates) { @@ -308,11 +308,11 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/MultiLineString|undefined} MultiLineString. */ readMultiLineString(node, objectStack) { - /** @type {Array.} */ + /** @type {Array} */ const lineStrings = pushParseAndPop([], this.MULTILINESTRING_PARSERS_, node, objectStack, this); if (lineStrings) { @@ -322,11 +322,11 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/MultiPolygon|undefined} MultiPolygon. */ readMultiPolygon(node, objectStack) { - /** @type {Array.} */ + /** @type {Array} */ const polygons = pushParseAndPop([], this.MULTIPOLYGON_PARSERS_, node, objectStack, this); if (polygons) { return new MultiPolygon(polygons); @@ -335,7 +335,7 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ pointMemberParser_(node, objectStack) { @@ -344,7 +344,7 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ lineStringMemberParser_(node, objectStack) { @@ -353,7 +353,7 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ polygonMemberParser_(node, objectStack) { @@ -362,7 +362,7 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/LineString|undefined} LineString. */ readLineString(node, objectStack) { @@ -377,9 +377,9 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private - * @return {Array.|undefined} LinearRing flat coordinates. + * @return {Array|undefined} LinearRing flat coordinates. */ readFlatLinearRing_(node, objectStack) { const ring = pushParseAndPop(null, @@ -394,7 +394,7 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/LinearRing|undefined} LinearRing. */ readLinearRing(node, objectStack) { @@ -406,11 +406,11 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/Polygon|undefined} Polygon. */ readPolygon(node, objectStack) { - /** @type {Array.>} */ + /** @type {Array>} */ const flatLinearRings = pushParseAndPop([null], this.FLAT_LINEAR_RINGS_PARSERS_, node, objectStack, this); if (flatLinearRings && flatLinearRings[0]) { @@ -429,9 +429,9 @@ class GMLBase extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private - * @return {Array.} Flat coordinates. + * @return {Array} Flat coordinates. */ readFlatCoordinatesFromNode_(node, objectStack) { return pushParseAndPop(null, this.GEOMETRY_FLAT_COORDINATES_PARSERS_, node, objectStack, this); diff --git a/src/ol/format/GPX.js b/src/ol/format/GPX.js index 4189888192..7274c1893e 100644 --- a/src/ol/format/GPX.js +++ b/src/ol/format/GPX.js @@ -19,7 +19,7 @@ import {createElementNS, makeArrayPusher, makeArraySerializer, makeChildAppender /** * @const - * @type {Array.} + * @type {Array} */ const NAMESPACE_URIS = [ null, @@ -38,7 +38,7 @@ const SCHEMA_LOCATION = 'http://www.topografix.com/GPX/1/1 ' + /** * @const - * @type {Object.): (module:ol/Feature|undefined)>} + * @type {Object.): (module:ol/Feature|undefined)>} */ const FEATURE_READER = { 'rte': readRte, @@ -138,7 +138,7 @@ class GPX extends XMLFeature { } /** - * @param {Array.} features List of features. + * @param {Array} features List of features. * @private */ handleReadExtensions_(features) { @@ -182,7 +182,7 @@ class GPX extends XMLFeature { return []; } if (node.localName == 'gpx') { - /** @type {Array.} */ + /** @type {Array} */ const features = pushParseAndPop([], GPX_PARSERS, node, [this.getReadOptions(node, opt_options)]); if (features) { @@ -200,7 +200,7 @@ class GPX extends XMLFeature { * LineString geometries are output as routes (``), and MultiLineString * as tracks (``). * - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @return {Node} Node. * @override @@ -321,7 +321,7 @@ const WPT_PARSERS = makeStructureNS( /** * @const - * @type {Array.} + * @type {Array} */ const LINK_SEQUENCE = ['text', 'type']; @@ -339,7 +339,7 @@ const LINK_SERIALIZERS = makeStructureNS( /** * @const - * @type {Object.>} + * @type {Object.>} */ const RTE_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -366,7 +366,7 @@ const RTE_SERIALIZERS = makeStructureNS( /** * @const - * @type {Object.>} + * @type {Object.>} */ const RTEPT_TYPE_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -376,7 +376,7 @@ const RTEPT_TYPE_SEQUENCE = makeStructureNS( /** * @const - * @type {Object.>} + * @type {Object.>} */ const TRK_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -403,7 +403,7 @@ const TRK_SERIALIZERS = makeStructureNS( /** * @const - * @type {function(*, Array.<*>, string=): (Node|undefined)} + * @type {function(*, Array<*>, string=): (Node|undefined)} */ const TRKSEG_NODE_FACTORY = makeSimpleNodeFactory('trkpt'); @@ -420,7 +420,7 @@ const TRKSEG_SERIALIZERS = makeStructureNS( /** * @const - * @type {Object.>} + * @type {Object.>} */ const WPT_TYPE_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -470,7 +470,7 @@ const GEOMETRY_TYPE_TO_NODENAME = { /** * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node|undefined} Node. */ @@ -487,11 +487,11 @@ function GPX_NODE_FACTORY(value, objectStack, opt_nodeName) { /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {module:ol/format/GPX~LayoutOptions} layoutOptions Layout options. * @param {Node} node Node. * @param {!Object} values Values. - * @return {Array.} Flat coordinates. + * @return {Array} Flat coordinates. */ function appendCoordinate(flatCoordinates, layoutOptions, node, values) { flatCoordinates.push( @@ -520,8 +520,8 @@ function appendCoordinate(flatCoordinates, layoutOptions, node, values) { * and ends arrays by shrinking them accordingly (removing unused zero entries). * * @param {module:ol/format/GPX~LayoutOptions} layoutOptions Layout options. - * @param {Array.} flatCoordinates Flat coordinates. - * @param {Array.=} ends Ends. + * @param {Array} flatCoordinates Flat coordinates. + * @param {Array=} ends Ends. * @return {module:ol/geom/GeometryLayout} Layout. */ function applyLayoutOptions(layoutOptions, flatCoordinates, ends) { @@ -561,7 +561,7 @@ function applyLayoutOptions(layoutOptions, flatCoordinates, ends) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function parseLink(node, objectStack) { const values = /** @type {Object} */ (objectStack[objectStack.length - 1]); @@ -575,7 +575,7 @@ function parseLink(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function parseExtensions(node, objectStack) { const values = /** @type {Object} */ (objectStack[objectStack.length - 1]); @@ -585,13 +585,13 @@ function parseExtensions(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function parseRtePt(node, objectStack) { const values = pushParseAndPop({}, RTEPT_PARSERS, node, objectStack); if (values) { const rteValues = /** @type {!Object} */ (objectStack[objectStack.length - 1]); - const flatCoordinates = /** @type {Array.} */ (rteValues['flatCoordinates']); + const flatCoordinates = /** @type {Array} */ (rteValues['flatCoordinates']); const layoutOptions = /** @type {module:ol/format/GPX~LayoutOptions} */ (rteValues['layoutOptions']); appendCoordinate(flatCoordinates, layoutOptions, node, values); } @@ -600,13 +600,13 @@ function parseRtePt(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function parseTrkPt(node, objectStack) { const values = pushParseAndPop({}, TRKPT_PARSERS, node, objectStack); if (values) { const trkValues = /** @type {!Object} */ (objectStack[objectStack.length - 1]); - const flatCoordinates = /** @type {Array.} */ (trkValues['flatCoordinates']); + const flatCoordinates = /** @type {Array} */ (trkValues['flatCoordinates']); const layoutOptions = /** @type {module:ol/format/GPX~LayoutOptions} */ (trkValues['layoutOptions']); appendCoordinate(flatCoordinates, layoutOptions, node, values); } @@ -615,21 +615,21 @@ function parseTrkPt(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function parseTrkSeg(node, objectStack) { const values = /** @type {Object} */ (objectStack[objectStack.length - 1]); parseNode(TRKSEG_PARSERS, node, objectStack); - const flatCoordinates = /** @type {Array.} */ + const flatCoordinates = /** @type {Array} */ (values['flatCoordinates']); - const ends = /** @type {Array.} */ (values['ends']); + const ends = /** @type {Array} */ (values['ends']); ends.push(flatCoordinates.length); } /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/Feature|undefined} Track. */ function readRte(node, objectStack) { @@ -641,7 +641,7 @@ function readRte(node, objectStack) { if (!values) { return undefined; } - const flatCoordinates = /** @type {Array.} */ + const flatCoordinates = /** @type {Array} */ (values['flatCoordinates']); delete values['flatCoordinates']; const layoutOptions = /** @type {module:ol/format/GPX~LayoutOptions} */ (values['layoutOptions']); @@ -657,7 +657,7 @@ function readRte(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/Feature|undefined} Track. */ function readTrk(node, objectStack) { @@ -670,10 +670,10 @@ function readTrk(node, objectStack) { if (!values) { return undefined; } - const flatCoordinates = /** @type {Array.} */ + const flatCoordinates = /** @type {Array} */ (values['flatCoordinates']); delete values['flatCoordinates']; - const ends = /** @type {Array.} */ (values['ends']); + const ends = /** @type {Array} */ (values['ends']); delete values['ends']; const layoutOptions = /** @type {module:ol/format/GPX~LayoutOptions} */ (values['layoutOptions']); delete values['layoutOptions']; @@ -688,7 +688,7 @@ function readTrk(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/Feature|undefined} Waypoint. */ function readWpt(node, objectStack) { @@ -711,7 +711,7 @@ function readWpt(node, objectStack) { /** * @param {Node} node Node. * @param {string} value Value for the link's `href` attribute. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeLink(node, value, objectStack) { node.setAttribute('href', value); @@ -730,7 +730,7 @@ function writeLink(node, value, objectStack) { /** * @param {Node} node Node. * @param {module:ol/coordinate~Coordinate} coordinate Coordinate. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeWptType(node, coordinate, objectStack) { const context = objectStack[objectStack.length - 1]; @@ -774,7 +774,7 @@ function writeWptType(node, coordinate, objectStack) { /** * @param {Node} node Node. * @param {module:ol/Feature} feature Feature. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeRte(node, feature, objectStack) { const options = /** @type {module:ol/format/Feature~WriteOptions} */ (objectStack[0]); @@ -798,7 +798,7 @@ function writeRte(node, feature, objectStack) { /** * @param {Node} node Node. * @param {module:ol/Feature} feature Feature. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeTrk(node, feature, objectStack) { const options = /** @type {module:ol/format/Feature~WriteOptions} */ (objectStack[0]); @@ -823,7 +823,7 @@ function writeTrk(node, feature, objectStack) { /** * @param {Node} node Node. * @param {module:ol/geom/LineString} lineString LineString. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeTrkSeg(node, lineString, objectStack) { /** @type {module:ol/xml~NodeStackItem} */ @@ -838,7 +838,7 @@ function writeTrkSeg(node, lineString, objectStack) { /** * @param {Node} node Node. * @param {module:ol/Feature} feature Feature. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeWpt(node, feature, objectStack) { const options = /** @type {module:ol/format/Feature~WriteOptions} */ (objectStack[0]); diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index 85ca67281a..8b484fc889 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -115,7 +115,7 @@ class GeoJSON extends JSONFeature { */ readFeaturesFromObject(object, opt_options) { const geoJSONObject = /** @type {GeoJSONObject} */ (object); - /** @type {Array.} */ + /** @type {Array} */ let features = null; if (geoJSONObject.type === 'FeatureCollection') { const geoJSONFeatureCollection = /** @type {GeoJSONFeatureCollection} */ (object); @@ -196,7 +196,7 @@ class GeoJSON extends JSONFeature { /** * Encode an array of features as a GeoJSON object. * - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @return {GeoJSONFeatureCollection} GeoJSON Object. * @override diff --git a/src/ol/format/JSONFeature.js b/src/ol/format/JSONFeature.js index 34042a5871..3458794691 100644 --- a/src/ol/format/JSONFeature.js +++ b/src/ol/format/JSONFeature.js @@ -44,7 +44,7 @@ class JSONFeature extends FeatureFormat { * * @param {ArrayBuffer|Document|Node|Object|string} source Source. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @return {Array.} Features. + * @return {Array} Features. * @api */ readFeatures(source, opt_options) { @@ -66,7 +66,7 @@ class JSONFeature extends FeatureFormat { * @param {Object} object Object. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @protected - * @return {Array.} Features. + * @return {Array} Features. */ readFeaturesFromObject(object, opt_options) {} @@ -134,7 +134,7 @@ class JSONFeature extends FeatureFormat { /** * Encode an array of features as string. * - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @return {string} Encoded features. * @api @@ -145,7 +145,7 @@ class JSONFeature extends FeatureFormat { /** * @abstract - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @return {Object} Object. */ diff --git a/src/ol/format/KML.js b/src/ol/format/KML.js index 17aa763edb..ecd42ddce7 100644 --- a/src/ol/format/KML.js +++ b/src/ol/format/KML.js @@ -43,14 +43,14 @@ import {createElementNS, getAllTextContent, isDocument, isNode, makeArrayExtende /** * @typedef {Object} GxTrackObject - * @property {Array.} flatCoordinates - * @property {Array.} whens + * @property {Array} flatCoordinates + * @property {Array} whens */ /** * @const - * @type {Array.} + * @type {Array} */ const GX_NAMESPACE_URIS = [ 'http://www.google.com/kml/ext/2.2' @@ -59,7 +59,7 @@ const GX_NAMESPACE_URIS = [ /** * @const - * @type {Array.} + * @type {Array} */ const NAMESPACE_URIS = [ null, @@ -165,7 +165,7 @@ const REGION_PARSERS = makeStructureNS( /** * @const - * @type {Object.>} + * @type {Object.>} */ const KML_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -295,13 +295,13 @@ export function getDefaultStyle() { } /** - * @type {Array.} + * @type {Array} */ let DEFAULT_STYLE_ARRAY = null; /** * Get the default style array (or null if not yet set). - * @return {Array.} The default style. + * @return {Array} The default style. */ export function getDefaultStyleArray() { return DEFAULT_STYLE_ARRAY; @@ -377,7 +377,7 @@ function createStyleDefaults() { * @typedef {Object} Options * @property {boolean} [extractStyles=true] Extract styles from the KML. * @property {boolean} [showPointNames=true] Show names as labels for placemarks which contain points. - * @property {Array.} [defaultStyle] Default style. The + * @property {Array} [defaultStyle] Default style. The * default default style is the same as Google Earth. * @property {boolean} [writeStyles=true] Write styles into KML. */ @@ -420,7 +420,7 @@ class KML extends XMLFeature { /** * @private - * @type {Array.} + * @type {Array} */ this.defaultStyle_ = options.defaultStyle ? options.defaultStyle : DEFAULT_STYLE_ARRAY; @@ -441,7 +441,7 @@ class KML extends XMLFeature { /** * @private - * @type {!Object.|string)>} + * @type {!Object.|string)>} */ this.sharedStyles_ = {}; @@ -456,9 +456,9 @@ class KML extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private - * @return {Array.|undefined} Features. + * @return {Array|undefined} Features. */ readDocumentOrFolder_(node, objectStack) { // FIXME use scope somehow @@ -470,7 +470,7 @@ class KML extends XMLFeature { 'Style': this.readSharedStyle_.bind(this), 'StyleMap': this.readSharedStyleMap_.bind(this) }); - /** @type {Array.} */ + /** @type {Array} */ const features = pushParseAndPop([], parsersNS, node, objectStack, this); if (features) { return features; @@ -481,7 +481,7 @@ class KML extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private * @return {module:ol/Feature|undefined} Feature. */ @@ -524,7 +524,7 @@ class KML extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ readSharedStyle_(node, objectStack) { @@ -550,7 +550,7 @@ class KML extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @private */ readSharedStyleMap_(node, objectStack) { @@ -698,7 +698,7 @@ class KML extends XMLFeature { * Read the network links of the KML. * * @param {Document|Node|string} source Source. - * @return {Array.} Network links. + * @return {Array} Network links. * @api */ readNetworkLinks(source) { @@ -718,7 +718,7 @@ class KML extends XMLFeature { /** * @param {Document} doc Document. - * @return {Array.} Network links. + * @return {Array} Network links. */ readNetworkLinksFromDocument(doc) { const networkLinks = []; @@ -732,7 +732,7 @@ class KML extends XMLFeature { /** * @param {Node} node Node. - * @return {Array.} Network links. + * @return {Array} Network links. */ readNetworkLinksFromNode(node) { const networkLinks = []; @@ -760,7 +760,7 @@ class KML extends XMLFeature { * Read the regions of the KML. * * @param {Document|Node|string} source Source. - * @return {Array.} Regions. + * @return {Array} Regions. * @api */ readRegion(source) { @@ -780,7 +780,7 @@ class KML extends XMLFeature { /** * @param {Document} doc Document. - * @return {Array.} Region. + * @return {Array} Region. */ readRegionFromDocument(doc) { const regions = []; @@ -794,7 +794,7 @@ class KML extends XMLFeature { /** * @param {Node} node Node. - * @return {Array.} Region. + * @return {Array} Region. * @api */ readRegionFromNode(node) { @@ -823,7 +823,7 @@ class KML extends XMLFeature { * Encode an array of features in the KML format as an XML node. GeometryCollections, * MultiPoints, MultiLineStrings, and MultiPolygons are output as MultiGeometries. * - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @return {Node} Node. * @override @@ -902,10 +902,10 @@ function createNameStyleFunction(foundStyle, name) { /** - * @param {Array.|undefined} style Style. + * @param {Array|undefined} style Style. * @param {string} styleUrl Style URL. - * @param {Array.} defaultStyle Default style. - * @param {!Object.|string)>} sharedStyles Shared styles. + * @param {Array} defaultStyle Default style. + * @param {!Object.|string)>} sharedStyles Shared styles. * @param {boolean|undefined} showPointNames true to show names for point placemarks. * @return {module:ol/style/Style~StyleFunction} Feature style function. */ @@ -915,7 +915,7 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles, /** * @param {module:ol/Feature} feature feature. * @param {number} resolution Resolution. - * @return {Array.} Style. + * @return {Array} Style. */ function(feature, resolution) { let drawName = showPointNames; @@ -960,11 +960,11 @@ function createFeatureStyleFunction(style, styleUrl, defaultStyle, sharedStyles, /** - * @param {Array.|string|undefined} styleValue Style value. - * @param {Array.} defaultStyle Default style. - * @param {!Object.|string)>} sharedStyles + * @param {Array|string|undefined} styleValue Style value. + * @param {Array} defaultStyle Default style. + * @param {!Object.|string)>} sharedStyles * Shared styles. - * @return {Array.} Style. + * @return {Array} Style. */ function findStyle(styleValue, defaultStyle, sharedStyles) { if (Array.isArray(styleValue)) { @@ -1009,7 +1009,7 @@ function readColor(node) { /** * @param {Node} node Node. - * @return {Array.|undefined} Flat coordinates. + * @return {Array|undefined} Flat coordinates. */ export function readFlatCoordinates(node) { let s = getAllTextContent(node, false); @@ -1104,8 +1104,8 @@ const STYLE_MAP_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. - * @return {Array.|string|undefined} StyleMap. + * @param {Array<*>} objectStack Object stack. + * @return {Array|string|undefined} StyleMap. */ function readStyleMapValue(node, objectStack) { return pushParseAndPop(undefined, @@ -1128,7 +1128,7 @@ const ICON_STYLE_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function iconStyleParser(node, objectStack) { // FIXME refreshMode @@ -1242,7 +1242,7 @@ const LABEL_STYLE_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function labelStyleParser(node, objectStack) { // FIXME colorMode @@ -1277,7 +1277,7 @@ const LINE_STYLE_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function lineStyleParser(node, objectStack) { // FIXME colorMode @@ -1314,7 +1314,7 @@ const POLY_STYLE_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function polyStyleParser(node, objectStack) { // FIXME colorMode @@ -1352,8 +1352,8 @@ const FLAT_LINEAR_RING_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. - * @return {Array.} LinearRing flat coordinates. + * @param {Array<*>} objectStack Object stack. + * @return {Array} LinearRing flat coordinates. */ function readFlatLinearRing(node, objectStack) { return pushParseAndPop(null, @@ -1363,7 +1363,7 @@ function readFlatLinearRing(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function gxCoordParser(node, objectStack) { const gxTrackObject = /** @type {module:ol/format/KML~GxTrackObject} */ @@ -1396,7 +1396,7 @@ const GX_MULTITRACK_GEOMETRY_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/MultiLineString|undefined} MultiLineString. */ function readGxMultiTrack(node, objectStack) { @@ -1424,7 +1424,7 @@ const GX_TRACK_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/LineString|undefined} LineString. */ function readGxTrack(node, objectStack) { @@ -1463,7 +1463,7 @@ const ICON_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object} Icon object. */ function readIcon(node, objectStack) { @@ -1489,8 +1489,8 @@ const GEOMETRY_FLAT_COORDINATES_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. - * @return {Array.} Flat coordinates. + * @param {Array<*>} objectStack Object stack. + * @return {Array} Flat coordinates. */ function readFlatCoordinatesFromNode(node, objectStack) { return pushParseAndPop(null, @@ -1512,7 +1512,7 @@ const EXTRUDE_AND_ALTITUDE_MODE_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/LineString|undefined} LineString. */ function readLineString(node, objectStack) { @@ -1533,7 +1533,7 @@ function readLineString(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/Polygon|undefined} Polygon. */ function readLinearRing(node, objectStack) { @@ -1568,7 +1568,7 @@ const MULTI_GEOMETRY_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/Geometry} Geometry. */ function readMultiGeometry(node, objectStack) { @@ -1627,7 +1627,7 @@ function readMultiGeometry(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/Point|undefined} Point. */ function readPoint(node, objectStack) { @@ -1659,7 +1659,7 @@ const FLAT_LINEAR_RINGS_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/geom/Polygon|undefined} Polygon. */ function readPolygon(node, objectStack) { @@ -1699,8 +1699,8 @@ const STYLE_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. - * @return {Array.} Style. + * @param {Array<*>} objectStack Object stack. + * @return {Array} Style. */ function readStyle(node, objectStack) { const styleObject = pushParseAndPop( @@ -1746,7 +1746,7 @@ function readStyle(node, objectStack) { * Reads an array of geometries and creates arrays for common geometry * properties. Then sets them to the multi geometry. * @param {module:ol/geom/MultiPoint|module:ol/geom/MultiLineString|module:ol/geom/MultiPolygon} multiGeometry A multi-geometry. - * @param {Array.} geometries List of geometries. + * @param {Array} geometries List of geometries. */ function setCommonGeometryProperties(multiGeometry, geometries) { const ii = geometries.length; @@ -1789,7 +1789,7 @@ const DATA_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function dataParser(node, objectStack) { const name = node.getAttribute('name'); @@ -1817,7 +1817,7 @@ const EXTENDED_DATA_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function extendedDataParser(node, objectStack) { parseNode(EXTENDED_DATA_PARSERS, node, objectStack); @@ -1825,7 +1825,7 @@ function extendedDataParser(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function regionParser(node, objectStack) { parseNode(REGION_PARSERS, node, objectStack); @@ -1845,7 +1845,7 @@ const PAIR_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function pairDataParser(node, objectStack) { const pairObject = pushParseAndPop( @@ -1872,7 +1872,7 @@ function pairDataParser(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function placemarkStyleMapParser(node, objectStack) { const styleMapValue = readStyleMapValue(node, objectStack); @@ -1902,7 +1902,7 @@ const SCHEMA_DATA_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function schemaDataParser(node, objectStack) { parseNode(SCHEMA_DATA_PARSERS, node, objectStack); @@ -1911,7 +1911,7 @@ function schemaDataParser(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function simpleDataParser(node, objectStack) { const name = node.getAttribute('name'); @@ -1941,7 +1941,7 @@ const LAT_LON_ALT_BOX_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function latLonAltBoxParser(node, objectStack) { const object = pushParseAndPop({}, LAT_LON_ALT_BOX_PARSERS, node, objectStack); @@ -1977,7 +1977,7 @@ const LOD_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function lodParser(node, objectStack) { const object = pushParseAndPop({}, LOD_PARSERS, node, objectStack); @@ -2004,14 +2004,14 @@ const INNER_BOUNDARY_IS_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function innerBoundaryIsParser(node, objectStack) { - /** @type {Array.|undefined} */ + /** @type {Array|undefined} */ const flatLinearRing = pushParseAndPop(undefined, INNER_BOUNDARY_IS_PARSERS, node, objectStack); if (flatLinearRing) { - const flatLinearRings = /** @type {Array.>} */ + const flatLinearRings = /** @type {Array>} */ (objectStack[objectStack.length - 1]); flatLinearRings.push(flatLinearRing); } @@ -2030,14 +2030,14 @@ const OUTER_BOUNDARY_IS_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function outerBoundaryIsParser(node, objectStack) { - /** @type {Array.|undefined} */ + /** @type {Array|undefined} */ const flatLinearRing = pushParseAndPop(undefined, OUTER_BOUNDARY_IS_PARSERS, node, objectStack); if (flatLinearRing) { - const flatLinearRings = /** @type {Array.>} */ + const flatLinearRings = /** @type {Array>} */ (objectStack[objectStack.length - 1]); flatLinearRings[0] = flatLinearRing; } @@ -2046,7 +2046,7 @@ function outerBoundaryIsParser(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function linkParser(node, objectStack) { parseNode(LINK_PARSERS, node, objectStack); @@ -2055,7 +2055,7 @@ function linkParser(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function whenParser(node, objectStack) { const gxTrackObject = /** @type {module:ol/format/KML~GxTrackObject} */ @@ -2085,8 +2085,8 @@ function writeColorTextNode(node, color) { /** * @param {Node} node Node to append a TextNode with the coordinates to. - * @param {Array.} coordinates Coordinates. - * @param {Array.<*>} objectStack Object stack. + * @param {Array} coordinates Coordinates. + * @param {Array<*>} objectStack Object stack. */ function writeCoordinatesTextNode(node, coordinates, objectStack) { const context = objectStack[objectStack.length - 1]; @@ -2138,7 +2138,7 @@ const EXTENDEDDATA_NODE_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. * @param {{name: *, value: *}} pair Name value pair. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeDataNode(node, pair, objectStack) { node.setAttribute('name', pair.name); @@ -2193,7 +2193,7 @@ const DOCUMENT_SERIALIZERS = makeStructureNS( /** * @const * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node|undefined} Node. */ @@ -2205,8 +2205,8 @@ const DOCUMENT_NODE_FACTORY = function(value, objectStack, opt_nodeName) { /** * @param {Node} node Node. - * @param {Array.} features Features. - * @param {Array.<*>} objectStack Object stack. + * @param {Array} features Features. + * @param {Array<*>} objectStack Object stack. * @this {module:ol/format/KML} */ function writeDocument(node, features, objectStack) { @@ -2220,7 +2220,7 @@ function writeDocument(node, features, objectStack) { /** * A factory for creating Data nodes. * @const - * @type {function(*, Array.<*>): (Node|undefined)} + * @type {function(*, Array<*>): (Node|undefined)} */ const DATA_NODE_FACTORY = makeSimpleNodeFactory('Data'); @@ -2228,7 +2228,7 @@ const DATA_NODE_FACTORY = makeSimpleNodeFactory('Data'); /** * @param {Node} node Node. * @param {{names: Array, values: (Array<*>)}} namesAndValues Names and values. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeExtendedData(node, namesAndValues, objectStack) { const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node}; @@ -2245,7 +2245,7 @@ function writeExtendedData(node, namesAndValues, objectStack) { /** * @const - * @type {Object.>} + * @type {Object.>} */ const ICON_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -2275,7 +2275,7 @@ const ICON_SERIALIZERS = makeStructureNS( /** * @const * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node|undefined} Node. */ @@ -2288,7 +2288,7 @@ const GX_NODE_FACTORY = function(value, objectStack, opt_nodeName) { /** * @param {Node} node Node. * @param {Object} icon Icon object. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeIcon(node, icon, objectStack) { const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node}; @@ -2308,7 +2308,7 @@ function writeIcon(node, icon, objectStack) { /** * @const - * @type {Object.>} + * @type {Object.>} */ const ICON_STYLE_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -2332,7 +2332,7 @@ const ICON_STYLE_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. * @param {module:ol/style/Icon} style Icon style. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeIconStyle(node, style, objectStack) { const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node}; @@ -2388,7 +2388,7 @@ function writeIconStyle(node, style, objectStack) { /** * @const - * @type {Object.>} + * @type {Object.>} */ const LABEL_STYLE_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -2410,7 +2410,7 @@ const LABEL_STYLE_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. * @param {module:ol/style/Text} style style. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeLabelStyle(node, style, objectStack) { const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node}; @@ -2434,7 +2434,7 @@ function writeLabelStyle(node, style, objectStack) { /** * @const - * @type {Object.>} + * @type {Object.>} */ const LINE_STYLE_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -2456,7 +2456,7 @@ const LINE_STYLE_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. * @param {module:ol/style/Stroke} style style. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeLineStyle(node, style, objectStack) { const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node}; @@ -2491,7 +2491,7 @@ const GEOMETRY_TYPE_TO_NODENAME = { /** * @const * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node|undefined} Node. */ @@ -2507,7 +2507,7 @@ const GEOMETRY_NODE_FACTORY = function(value, objectStack, opt_nodeName) { /** * A factory for creating Point nodes. * @const - * @type {function(*, Array.<*>, string=): (Node|undefined)} + * @type {function(*, Array<*>, string=): (Node|undefined)} */ const POINT_NODE_FACTORY = makeSimpleNodeFactory('Point'); @@ -2515,7 +2515,7 @@ const POINT_NODE_FACTORY = makeSimpleNodeFactory('Point'); /** * A factory for creating LineString nodes. * @const - * @type {function(*, Array.<*>, string=): (Node|undefined)} + * @type {function(*, Array<*>, string=): (Node|undefined)} */ const LINE_STRING_NODE_FACTORY = makeSimpleNodeFactory('LineString'); @@ -2523,7 +2523,7 @@ const LINE_STRING_NODE_FACTORY = makeSimpleNodeFactory('LineString'); /** * A factory for creating LinearRing nodes. * @const - * @type {function(*, Array.<*>, string=): (Node|undefined)} + * @type {function(*, Array<*>, string=): (Node|undefined)} */ const LINEAR_RING_NODE_FACTORY = makeSimpleNodeFactory('LinearRing'); @@ -2531,7 +2531,7 @@ const LINEAR_RING_NODE_FACTORY = makeSimpleNodeFactory('LinearRing'); /** * A factory for creating Polygon nodes. * @const - * @type {function(*, Array.<*>, string=): (Node|undefined)} + * @type {function(*, Array<*>, string=): (Node|undefined)} */ const POLYGON_NODE_FACTORY = makeSimpleNodeFactory('Polygon'); @@ -2555,15 +2555,15 @@ const MULTI_GEOMETRY_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. * @param {module:ol/geom/Geometry} geometry Geometry. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeMultiGeometry(node, geometry, objectStack) { /** @type {module:ol/xml~NodeStackItem} */ const context = {node: node}; const type = geometry.getType(); - /** @type {Array.} */ + /** @type {Array} */ let geometries; - /** @type {function(*, Array.<*>, string=): (Node|undefined)} */ + /** @type {function(*, Array<*>, string=): (Node|undefined)} */ let factory; if (type == GeometryType.GEOMETRY_COLLECTION) { geometries = /** @type {module:ol/geom/GeometryCollection} */ (geometry).getGeometries(); @@ -2602,7 +2602,7 @@ const BOUNDARY_IS_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. * @param {module:ol/geom/LinearRing} linearRing Linear ring. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeBoundaryIs(node, linearRing, objectStack) { const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node}; @@ -2637,7 +2637,7 @@ const PLACEMARK_SERIALIZERS = makeStructureNS( /** * @const - * @type {Object.>} + * @type {Object.>} */ const PLACEMARK_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -2649,7 +2649,7 @@ const PLACEMARK_SEQUENCE = makeStructureNS( /** * A factory for creating ExtendedData nodes. * @const - * @type {function(*, Array.<*>): (Node|undefined)} + * @type {function(*, Array<*>): (Node|undefined)} */ const EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData'); @@ -2659,7 +2659,7 @@ const EXTENDEDDATA_NODE_FACTORY = makeSimpleNodeFactory('ExtendedData'); * (ExtendedData). * @param {Node} node Node. * @param {module:ol/Feature} feature Feature. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @this {module:ol/format/KML} */ function writePlacemark(node, feature, objectStack) { @@ -2723,7 +2723,7 @@ function writePlacemark(node, feature, objectStack) { /** * @const - * @type {Object.>} + * @type {Object.>} */ const PRIMITIVE_GEOMETRY_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -2747,7 +2747,7 @@ const PRIMITIVE_GEOMETRY_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. * @param {module:ol/geom/SimpleGeometry} geometry Geometry. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writePrimitiveGeometry(node, geometry, objectStack) { const flatCoordinates = geometry.getFlatCoordinates(); @@ -2783,7 +2783,7 @@ const POLYGON_SERIALIZERS = makeStructureNS( /** * A factory for creating innerBoundaryIs nodes. * @const - * @type {function(*, Array.<*>, string=): (Node|undefined)} + * @type {function(*, Array<*>, string=): (Node|undefined)} */ const INNER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('innerBoundaryIs'); @@ -2791,7 +2791,7 @@ const INNER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('innerBoundaryIs'); /** * A factory for creating outerBoundaryIs nodes. * @const - * @type {function(*, Array.<*>, string=): (Node|undefined)} + * @type {function(*, Array<*>, string=): (Node|undefined)} */ const OUTER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('outerBoundaryIs'); @@ -2799,7 +2799,7 @@ const OUTER_BOUNDARY_NODE_FACTORY = makeSimpleNodeFactory('outerBoundaryIs'); /** * @param {Node} node Node. * @param {module:ol/geom/Polygon} polygon Polygon. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writePolygon(node, polygon, objectStack) { const linearRings = polygon.getLinearRings(); @@ -2831,7 +2831,7 @@ const POLY_STYLE_SERIALIZERS = makeStructureNS( /** * A factory for creating coordinates nodes. * @const - * @type {function(*, Array.<*>, string=): (Node|undefined)} + * @type {function(*, Array<*>, string=): (Node|undefined)} */ const COLOR_NODE_FACTORY = makeSimpleNodeFactory('color'); @@ -2839,7 +2839,7 @@ const COLOR_NODE_FACTORY = makeSimpleNodeFactory('color'); /** * @param {Node} node Node. * @param {module:ol/style/Fill} style Style. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writePolyStyle(node, style, objectStack) { const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node}; @@ -2861,7 +2861,7 @@ function writeScaleTextNode(node, scale) { /** * @const - * @type {Object.>} + * @type {Object.>} */ const STYLE_SEQUENCE = makeStructureNS( NAMESPACE_URIS, [ @@ -2885,7 +2885,7 @@ const STYLE_SERIALIZERS = makeStructureNS( /** * @param {Node} node Node. * @param {module:ol/style/Style} style Style. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function writeStyle(node, style, objectStack) { const /** @type {module:ol/xml~NodeStackItem} */ context = {node: node}; diff --git a/src/ol/format/MVT.js b/src/ol/format/MVT.js index 400e93e75e..57145a2611 100644 --- a/src/ol/format/MVT.js +++ b/src/ol/format/MVT.js @@ -23,7 +23,7 @@ import RenderFeature from '../render/Feature.js'; /** * @typedef {Object} Options - * @property {function((module:ol/geom/Geometry|Object.)=)|function(module:ol/geom/GeometryType,Array.,(Array.|Array.>),Object.,number)} [featureClass] + * @property {function((module:ol/geom/Geometry|Object.)=)|function(module:ol/geom/GeometryType,Array,(Array|Array>),Object.,number)} [featureClass] * Class for features returned by {@link module:ol/format/MVT#readFeatures}. Set to * {@link module:ol/Feature~Feature} to get full editing and geometry support at the cost of * decreased rendering performance. The default is {@link module:ol/render/Feature~RenderFeature}, @@ -32,7 +32,7 @@ import RenderFeature from '../render/Feature.js'; * features. * @property {string} [layerName='layer'] Name of the feature attribute that * holds the layer name. - * @property {Array.} [layers] Layers to read features from. If not + * @property {Array} [layers] Layers to read features from. If not * provided, features will be read from all layers. */ @@ -65,8 +65,8 @@ class MVT extends FeatureFormat { /** * @private * @type {function((module:ol/geom/Geometry|Object.)=)| - * function(module:ol/geom/GeometryType,Array., - * (Array.|Array.>),Object.,number)} + * function(module:ol/geom/GeometryType,Array, + * (Array|Array>),Object.,number)} */ this.featureClass_ = options.featureClass ? options.featureClass : RenderFeature; @@ -85,7 +85,7 @@ class MVT extends FeatureFormat { /** * @private - * @type {Array.} + * @type {Array} */ this.layers_ = options.layers ? options.layers : null; @@ -103,8 +103,8 @@ class MVT extends FeatureFormat { * @suppress {missingProperties} * @param {Object} pbf PBF. * @param {Object} feature Raw feature. - * @param {Array.} flatCoordinates Array to store flat coordinates in. - * @param {Array.} ends Array to store ends in. + * @param {Array} flatCoordinates Array to store flat coordinates in. + * @param {Array} ends Array to store ends in. * @private */ readRawGeometry_(pbf, feature, flatCoordinates, ends) { @@ -252,7 +252,7 @@ class MVT extends FeatureFormat { const pbf = new PBF(/** @type {ArrayBuffer} */ (source)); const pbfLayers = pbf.readFields(layersPBFReader, {}); - /** @type {Array.} */ + /** @type {Array} */ const features = []; for (const name in pbfLayers) { if (layers && layers.indexOf(name) == -1) { @@ -280,7 +280,7 @@ class MVT extends FeatureFormat { /** * Sets the layers that features will be read from. - * @param {Array.} layers Layers. + * @param {Array} layers Layers. * @api */ setLayers(layers) { diff --git a/src/ol/format/OSMXML.js b/src/ol/format/OSMXML.js index acd6d3bbc1..bb4d0762bc 100644 --- a/src/ol/format/OSMXML.js +++ b/src/ol/format/OSMXML.js @@ -17,7 +17,7 @@ import {pushParseAndPop, makeStructureNS} from '../xml.js'; /** * @const - * @type {Array.} + * @type {Array} */ const NAMESPACE_URIS = [null]; @@ -75,7 +75,7 @@ class OSMXML extends XMLFeature { // parse nodes in ways for (let j = 0; j < state.ways.length; j++) { const values = /** @type {Object} */ (state.ways[j]); - /** @type {Array.} */ + /** @type {Array} */ const flatCoordinates = []; for (let i = 0, ii = values.ndrefs.length; i < ii; i++) { const point = state.nodes[values.ndrefs[i]]; @@ -133,7 +133,7 @@ const NODE_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function readNode(node, objectStack) { const options = /** @type {module:ol/format/Feature~ReadOptions} */ (objectStack[0]); @@ -162,7 +162,7 @@ function readNode(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function readWay(node, objectStack) { const id = node.getAttribute('id'); @@ -178,7 +178,7 @@ function readWay(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function readNd(node, objectStack) { const values = /** @type {Object} */ (objectStack[objectStack.length - 1]); @@ -188,7 +188,7 @@ function readNd(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function readTag(node, objectStack) { const values = /** @type {Object} */ (objectStack[objectStack.length - 1]); diff --git a/src/ol/format/OWS.js b/src/ol/format/OWS.js index 0bbb70d164..5cec38342d 100644 --- a/src/ol/format/OWS.js +++ b/src/ol/format/OWS.js @@ -9,7 +9,7 @@ import {makeObjectPropertyPusher, makeObjectPropertySetter, makeStructureNS, pus /** * @const - * @type {Array.} + * @type {Array} */ const NAMESPACE_URIS = [null, 'http://www.opengis.net/ows/1.1']; @@ -206,7 +206,7 @@ const SERVICE_PROVIDER_PARSERS = /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The address. */ function readAddress(node, objectStack) { @@ -217,7 +217,7 @@ function readAddress(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The values. */ function readAllowedValues(node, objectStack) { @@ -228,7 +228,7 @@ function readAllowedValues(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The constraint. */ function readConstraint(node, objectStack) { @@ -244,7 +244,7 @@ function readConstraint(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The contact info. */ function readContactInfo(node, objectStack) { @@ -255,7 +255,7 @@ function readContactInfo(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The DCP. */ function readDcp(node, objectStack) { @@ -266,7 +266,7 @@ function readDcp(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The GET object. */ function readGet(node, objectStack) { @@ -281,7 +281,7 @@ function readGet(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The HTTP object. */ function readHttp(node, objectStack) { @@ -291,7 +291,7 @@ function readHttp(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The operation. */ function readOperation(node, objectStack) { @@ -309,7 +309,7 @@ function readOperation(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The operations metadata. */ function readOperationsMetadata(node, objectStack) { @@ -321,7 +321,7 @@ function readOperationsMetadata(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The phone. */ function readPhone(node, objectStack) { @@ -332,7 +332,7 @@ function readPhone(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The service identification. */ function readServiceIdentification(node, objectStack) { @@ -344,7 +344,7 @@ function readServiceIdentification(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The service contact. */ function readServiceContact(node, objectStack) { @@ -356,7 +356,7 @@ function readServiceContact(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} The service provider. */ function readServiceProvider(node, objectStack) { @@ -368,7 +368,7 @@ function readServiceProvider(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {string|undefined} The value. */ function readValue(node, objectStack) { diff --git a/src/ol/format/Polyline.js b/src/ol/format/Polyline.js index 206d46a03f..5f5f47dcae 100644 --- a/src/ol/format/Polyline.js +++ b/src/ol/format/Polyline.js @@ -138,7 +138,7 @@ class Polyline extends TextFeature { * * Attention: This function will modify the passed array! * - * @param {Array.} numbers A list of n-dimensional points. + * @param {Array} numbers A list of n-dimensional points. * @param {number} stride The number of dimension of the points in the list. * @param {number=} opt_factor The factor by which the numbers will be * multiplied. The remaining decimal places will get rounded away. @@ -177,14 +177,14 @@ export function encodeDeltas(numbers, stride, opt_factor) { * encoded string. * @param {number=} opt_factor The factor by which the resulting numbers will * be divided. Default is `1e5`. - * @return {Array.} A list of n-dimensional points. + * @return {Array} A list of n-dimensional points. * @api */ export function decodeDeltas(encoded, stride, opt_factor) { const factor = opt_factor ? opt_factor : 1e5; let d; - /** @type {Array.} */ + /** @type {Array} */ const lastNumbers = new Array(stride); for (d = 0; d < stride; ++d) { lastNumbers[d] = 0; @@ -209,7 +209,7 @@ export function decodeDeltas(encoded, stride, opt_factor) { * * Attention: This function will modify the passed array! * - * @param {Array.} numbers A list of floating point numbers. + * @param {Array} numbers A list of floating point numbers. * @param {number=} opt_factor The factor by which the numbers will be * multiplied. The remaining decimal places will get rounded away. * Default is `1e5`. @@ -232,7 +232,7 @@ export function encodeFloats(numbers, opt_factor) { * @param {string} encoded An encoded string. * @param {number=} opt_factor The factor by which the result will be divided. * Default is `1e5`. - * @return {Array.} A list of floating point numbers. + * @return {Array} A list of floating point numbers. * @api */ export function decodeFloats(encoded, opt_factor) { @@ -250,7 +250,7 @@ export function decodeFloats(encoded, opt_factor) { * * Attention: This function will modify the passed array! * - * @param {Array.} numbers A list of signed integers. + * @param {Array} numbers A list of signed integers. * @return {string} The encoded string. */ export function encodeSignedIntegers(numbers) { @@ -266,7 +266,7 @@ export function encodeSignedIntegers(numbers) { * Decode a list of signed integers from an encoded string * * @param {string} encoded An encoded string. - * @return {Array.} A list of signed integers. + * @return {Array} A list of signed integers. */ export function decodeSignedIntegers(encoded) { const numbers = decodeUnsignedIntegers(encoded); @@ -281,7 +281,7 @@ export function decodeSignedIntegers(encoded) { /** * Encode a list of unsigned integers and return an encoded string * - * @param {Array.} numbers A list of unsigned integers. + * @param {Array} numbers A list of unsigned integers. * @return {string} The encoded string. */ export function encodeUnsignedIntegers(numbers) { @@ -297,7 +297,7 @@ export function encodeUnsignedIntegers(numbers) { * Decode a list of unsigned integers from an encoded string * * @param {string} encoded An encoded string. - * @return {Array.} A list of unsigned integers. + * @return {Array} A list of unsigned integers. */ export function decodeUnsignedIntegers(encoded) { const numbers = []; diff --git a/src/ol/format/TextFeature.js b/src/ol/format/TextFeature.js index 0f866bdfd6..a6bf9de315 100644 --- a/src/ol/format/TextFeature.js +++ b/src/ol/format/TextFeature.js @@ -50,7 +50,7 @@ class TextFeature extends FeatureFormat { * * @param {Document|Node|Object|string} source Source. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @return {Array.} Features. + * @return {Array} Features. * @api */ readFeatures(source, opt_options) { @@ -62,7 +62,7 @@ class TextFeature extends FeatureFormat { * @param {string} text Text. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. * @protected - * @return {Array.} Features. + * @return {Array} Features. */ readFeaturesFromText(text, opt_options) {} @@ -133,7 +133,7 @@ class TextFeature extends FeatureFormat { /** * Encode an array of features as string. * - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @return {string} Encoded features. * @api @@ -144,7 +144,7 @@ class TextFeature extends FeatureFormat { /** * @abstract - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @protected * @return {string} Text. diff --git a/src/ol/format/TopoJSON.js b/src/ol/format/TopoJSON.js index d7dc6aba0e..a5fd9635fd 100644 --- a/src/ol/format/TopoJSON.js +++ b/src/ol/format/TopoJSON.js @@ -32,7 +32,7 @@ import {get as getProjection} from '../proj.js'; * ``` * will result in features that have a property `'layer'` set to `'example'`. * When not set, no property will be added to features. - * @property {Array.} [layers] Names of the TopoJSON topology's + * @property {Array} [layers] Names of the TopoJSON topology's * `objects`'s children to read features from. If not provided, features will * be read from all children. */ @@ -62,7 +62,7 @@ class TopoJSON extends JSONFeature { /** * @private - * @type {Array.} + * @type {Array} */ this.layers_ = options.layers ? options.layers : null; @@ -91,7 +91,7 @@ class TopoJSON extends JSONFeature { if (transform) { transformArcs(arcs, scale, translate); } - /** @type {Array.} */ + /** @type {Array} */ const features = []; const topoJSONFeatures = topoJSONTopology.objects; const property = this.layerName_; @@ -171,14 +171,14 @@ const GEOMETRY_READERS = { /** * Concatenate arcs into a coordinate array. - * @param {Array.} indices Indices of arcs to concatenate. Negative + * @param {Array} indices Indices of arcs to concatenate. Negative * values indicate arcs need to be reversed. - * @param {Array.>} arcs Array of arcs (already + * @param {Array>} arcs Array of arcs (already * transformed). - * @return {Array.} Coordinates array. + * @return {Array} Coordinates array. */ function concatenateArcs(indices, arcs) { - /** @type {Array.} */ + /** @type {Array} */ const coordinates = []; let index, arc; for (let i = 0, ii = indices.length; i < ii; ++i) { @@ -208,8 +208,8 @@ function concatenateArcs(indices, arcs) { * Create a point from a TopoJSON geometry object. * * @param {TopoJSONGeometry} object TopoJSON object. - * @param {Array.} scale Scale for each dimension. - * @param {Array.} translate Translation for each dimension. + * @param {Array} scale Scale for each dimension. + * @param {Array} translate Translation for each dimension. * @return {module:ol/geom/Point} Geometry. */ function readPointGeometry(object, scale, translate) { @@ -225,8 +225,8 @@ function readPointGeometry(object, scale, translate) { * Create a multi-point from a TopoJSON geometry object. * * @param {TopoJSONGeometry} object TopoJSON object. - * @param {Array.} scale Scale for each dimension. - * @param {Array.} translate Translation for each dimension. + * @param {Array} scale Scale for each dimension. + * @param {Array} translate Translation for each dimension. * @return {module:ol/geom/MultiPoint} Geometry. */ function readMultiPointGeometry(object, scale, translate) { @@ -244,7 +244,7 @@ function readMultiPointGeometry(object, scale, translate) { * Create a linestring from a TopoJSON geometry object. * * @param {TopoJSONGeometry} object TopoJSON object. - * @param {Array.>} arcs Array of arcs. + * @param {Array>} arcs Array of arcs. * @return {module:ol/geom/LineString} Geometry. */ function readLineStringGeometry(object, arcs) { @@ -257,7 +257,7 @@ function readLineStringGeometry(object, arcs) { * Create a multi-linestring from a TopoJSON geometry object. * * @param {TopoJSONGeometry} object TopoJSON object. - * @param {Array.>} arcs Array of arcs. + * @param {Array>} arcs Array of arcs. * @return {module:ol/geom/MultiLineString} Geometry. */ function readMultiLineStringGeometry(object, arcs) { @@ -273,7 +273,7 @@ function readMultiLineStringGeometry(object, arcs) { * Create a polygon from a TopoJSON geometry object. * * @param {TopoJSONGeometry} object TopoJSON object. - * @param {Array.>} arcs Array of arcs. + * @param {Array>} arcs Array of arcs. * @return {module:ol/geom/Polygon} Geometry. */ function readPolygonGeometry(object, arcs) { @@ -289,7 +289,7 @@ function readPolygonGeometry(object, arcs) { * Create a multi-polygon from a TopoJSON geometry object. * * @param {TopoJSONGeometry} object TopoJSON object. - * @param {Array.>} arcs Array of arcs. + * @param {Array>} arcs Array of arcs. * @return {module:ol/geom/MultiPolygon} Geometry. */ function readMultiPolygonGeometry(object, arcs) { @@ -313,14 +313,14 @@ function readMultiPolygonGeometry(object, arcs) { * * @param {TopoJSONGeometryCollection} collection TopoJSON Geometry * object. - * @param {Array.>} arcs Array of arcs. - * @param {Array.} scale Scale for each dimension. - * @param {Array.} translate Translation for each dimension. + * @param {Array>} arcs Array of arcs. + * @param {Array} scale Scale for each dimension. + * @param {Array} translate Translation for each dimension. * @param {string|undefined} property Property to set the `GeometryCollection`'s parent * object to. * @param {string} name Name of the `Topology`'s child object. * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @return {Array.} Array of features. + * @return {Array} Array of features. */ function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, property, name, opt_options) { const geometries = collection.geometries; @@ -337,9 +337,9 @@ function readFeaturesFromGeometryCollection(collection, arcs, scale, translate, * Create a feature from a TopoJSON geometry object. * * @param {TopoJSONGeometry} object TopoJSON geometry object. - * @param {Array.>} arcs Array of arcs. - * @param {Array.} scale Scale for each dimension. - * @param {Array.} translate Translation for each dimension. + * @param {Array>} arcs Array of arcs. + * @param {Array} scale Scale for each dimension. + * @param {Array} translate Translation for each dimension. * @param {string|undefined} property Property to set the `GeometryCollection`'s parent * object to. * @param {string} name Name of the `Topology`'s child object. @@ -379,9 +379,9 @@ function readFeatureFromGeometry(object, arcs, scale, translate, property, name, * Apply a linear transform to array of arcs. The provided array of arcs is * modified in place. * - * @param {Array.>} arcs Array of arcs. - * @param {Array.} scale Scale for each dimension. - * @param {Array.} translate Translation for each dimension. + * @param {Array>} arcs Array of arcs. + * @param {Array} scale Scale for each dimension. + * @param {Array} translate Translation for each dimension. */ function transformArcs(arcs, scale, translate) { for (let i = 0, ii = arcs.length; i < ii; ++i) { @@ -393,9 +393,9 @@ function transformArcs(arcs, scale, translate) { /** * Apply a linear transform to an arc. The provided arc is modified in place. * - * @param {Array.} arc Arc. - * @param {Array.} scale Scale for each dimension. - * @param {Array.} translate Translation for each dimension. + * @param {Array} arc Arc. + * @param {Array} scale Scale for each dimension. + * @param {Array} translate Translation for each dimension. */ function transformArc(arc, scale, translate) { let x = 0; @@ -416,8 +416,8 @@ function transformArc(arc, scale, translate) { * place. * * @param {module:ol/coordinate~Coordinate} vertex Vertex. - * @param {Array.} scale Scale for each dimension. - * @param {Array.} translate Translation for each dimension. + * @param {Array} scale Scale for each dimension. + * @param {Array} translate Translation for each dimension. */ function transformVertex(vertex, scale, translate) { vertex[0] = vertex[0] * scale[0] + translate[0]; diff --git a/src/ol/format/WFS.js b/src/ol/format/WFS.js index 3008f0785b..5103f1dace 100644 --- a/src/ol/format/WFS.js +++ b/src/ol/format/WFS.js @@ -82,7 +82,7 @@ const TRANSACTION_SERIALIZERS = { /** * @typedef {Object} Options * @property {Object.|string} [featureNS] The namespace URI used for features. - * @property {Array.|string} [featureType] The feature type to parse. Only used for read operations. + * @property {Array|string} [featureType] The feature type to parse. Only used for read operations. * @property {module:ol/format/GMLBase} [gmlFormat] The GML format to use to parse the response. Default is `ol/format/GML3`. * @property {string} [schemaLocation] Optional schemaLocation to use for serialization, this will override the default. */ @@ -92,14 +92,14 @@ const TRANSACTION_SERIALIZERS = { * @typedef {Object} WriteGetFeatureOptions * @property {string} featureNS The namespace URI used for features. * @property {string} featurePrefix The prefix for the feature namespace. - * @property {Array.} featureTypes The feature type names. + * @property {Array} featureTypes The feature type names. * @property {string} [srsName] SRS name. No srsName attribute will be set on * geometries when this is not provided. * @property {string} [handle] Handle. * @property {string} [outputFormat] Output format. * @property {number} [maxFeatures] Maximum number of features to fetch. * @property {string} [geometryName] Geometry name to use in a BBOX filter. - * @property {Array.} [propertyNames] Optional list of property names to serialize. + * @property {Array} [propertyNames] Optional list of property names to serialize. * @property {number} [startIndex] Start index to use for WFS paging. This is a * WFS 2.0 feature backported to WFS 1.1.0 by some Web Feature Services. * @property {number} [count] Number of features to retrieve when paging. This is a @@ -123,7 +123,7 @@ const TRANSACTION_SERIALIZERS = { * @property {string} [handle] Handle. * @property {boolean} [hasZ] Must be set to true if the transaction is for * a 3D layer. This will allow the Z coordinate to be included in the transaction. - * @property {Array.} nativeElements Native elements. Currently not supported. + * @property {Array} nativeElements Native elements. Currently not supported. * @property {module:ol/format/GMLBase~Options} [gmlOptions] GML options for the WFS transaction writer. * @property {string} [version='1.1.0'] WFS version to use for the transaction. Can be either `1.0.0` or `1.1.0`. */ @@ -143,7 +143,7 @@ const TRANSACTION_SERIALIZERS = { * @property {number} totalDeleted * @property {number} totalInserted * @property {number} totalUpdated - * @property {Array.} insertIds + * @property {Array} insertIds */ @@ -214,7 +214,7 @@ class WFS extends XMLFeature { /** * @private - * @type {Array.|string|undefined} + * @type {Array|string|undefined} */ this.featureType_ = options.featureType; @@ -240,14 +240,14 @@ class WFS extends XMLFeature { } /** - * @return {Array.|string|undefined} featureType + * @return {Array|string|undefined} featureType */ getFeatureType() { return this.featureType_; } /** - * @param {Array.|string|undefined} featureType Feature type(s) to parse. + * @param {Array|string|undefined} featureType Feature type(s) to parse. */ setFeatureType(featureType) { this.featureType_ = featureType; @@ -429,16 +429,16 @@ class WFS extends XMLFeature { }; assert(Array.isArray(options.featureTypes), 11); // `options.featureTypes` should be an Array - writeGetFeature(node, /** @type {!Array.} */ (options.featureTypes), [context]); + writeGetFeature(node, /** @type {!Array} */ (options.featureTypes), [context]); return node; } /** * Encode format as WFS `Transaction` and return the Node. * - * @param {Array.} inserts The features to insert. - * @param {Array.} updates The features to update. - * @param {Array.} deletes The features to delete. + * @param {Array} inserts The features to insert. + * @param {Array} updates The features to update. + * @param {Array} deletes The features to delete. * @param {module:ol/format/WFS~WriteTransactionOptions} options Write options. * @return {Node} Result. * @api @@ -538,7 +538,7 @@ class WFS extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Transaction Summary. */ function readTransactionSummary(node, objectStack) { @@ -562,7 +562,7 @@ const OGC_FID_PARSERS = { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function fidParser(node, objectStack) { parseNode(OGC_FID_PARSERS, node, objectStack); @@ -582,8 +582,8 @@ const INSERT_RESULTS_PARSERS = { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. - * @return {Array.|undefined} Insert results. + * @param {Array<*>} objectStack Object stack. + * @return {Array|undefined} Insert results. */ function readInsertResults(node, objectStack) { return pushParseAndPop( @@ -594,7 +594,7 @@ function readInsertResults(node, objectStack) { /** * @param {Node} node Node. * @param {module:ol/Feature} feature Feature. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeFeature(node, feature, objectStack) { const context = objectStack[objectStack.length - 1]; @@ -614,7 +614,7 @@ function writeFeature(node, feature, objectStack) { /** * @param {Node} node Node. * @param {number|string} fid Feature identifier. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeOgcFidFilter(node, fid, objectStack) { const filter = createElementNS(OGCNS, 'Filter'); @@ -645,7 +645,7 @@ function getTypeName(featurePrefix, featureType) { /** * @param {Node} node Node. * @param {module:ol/Feature} feature Feature. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeDelete(node, feature, objectStack) { const context = objectStack[objectStack.length - 1]; @@ -666,7 +666,7 @@ function writeDelete(node, feature, objectStack) { /** * @param {Node} node Node. * @param {module:ol/Feature} feature Feature. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeUpdate(node, feature, objectStack) { const context = objectStack[objectStack.length - 1]; @@ -706,7 +706,7 @@ function writeUpdate(node, feature, objectStack) { /** * @param {Node} node Node. * @param {Object} pair Property name and value. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeProperty(node, pair, objectStack) { const name = createElementNS(WFSNS, 'Name'); @@ -735,7 +735,7 @@ function writeProperty(node, pair, objectStack) { /** * @param {Node} node Node. * @param {{vendorId: string, safeToIgnore: boolean, value: string}} nativeElement The native element. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeNative(node, nativeElement, objectStack) { if (nativeElement.vendorId) { @@ -782,7 +782,7 @@ const GETFEATURE_SERIALIZERS = { /** * @param {Node} node Node. * @param {string} featureType Feature type. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeQuery(node, featureType, objectStack) { const context = /** @type {Object} */ (objectStack[objectStack.length - 1]); @@ -822,7 +822,7 @@ function writeQuery(node, featureType, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/Filter} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeFilterCondition(node, filter, objectStack) { /** @type {module:ol/xml~NodeStackItem} */ @@ -837,7 +837,7 @@ function writeFilterCondition(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/Bbox} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeBboxFilter(node, filter, objectStack) { const context = objectStack[objectStack.length - 1]; @@ -851,7 +851,7 @@ function writeBboxFilter(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/Contains} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeContainsFilter(node, filter, objectStack) { const context = objectStack[objectStack.length - 1]; @@ -865,7 +865,7 @@ function writeContainsFilter(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/Intersects} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeIntersectsFilter(node, filter, objectStack) { const context = objectStack[objectStack.length - 1]; @@ -879,7 +879,7 @@ function writeIntersectsFilter(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/Within} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeWithinFilter(node, filter, objectStack) { const context = objectStack[objectStack.length - 1]; @@ -893,7 +893,7 @@ function writeWithinFilter(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/During} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeDuringFilter(node, filter, objectStack) { @@ -918,7 +918,7 @@ function writeDuringFilter(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/LogicalNary} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeLogicalFilter(node, filter, objectStack) { /** @type {module:ol/xml~NodeStackItem} */ @@ -937,7 +937,7 @@ function writeLogicalFilter(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/Not} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeNotFilter(node, filter, objectStack) { /** @type {module:ol/xml~NodeStackItem} */ @@ -953,7 +953,7 @@ function writeNotFilter(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/ComparisonBinary} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeComparisonFilter(node, filter, objectStack) { if (filter.matchCase !== undefined) { @@ -967,7 +967,7 @@ function writeComparisonFilter(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/IsNull} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeIsNullFilter(node, filter, objectStack) { writeOgcPropertyName(node, filter.propertyName); @@ -977,7 +977,7 @@ function writeIsNullFilter(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/IsBetween} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeIsBetweenFilter(node, filter, objectStack) { writeOgcPropertyName(node, filter.propertyName); @@ -995,7 +995,7 @@ function writeIsBetweenFilter(node, filter, objectStack) { /** * @param {Node} node Node. * @param {module:ol/format/filter/IsLike} filter Filter. - * @param {Array.<*>} objectStack Node stack. + * @param {Array<*>} objectStack Node stack. */ function writeIsLikeFilter(node, filter, objectStack) { node.setAttribute('wildCard', filter.wildCard); @@ -1069,8 +1069,8 @@ export function writeFilter(filter) { /** * @param {Node} node Node. - * @param {Array.} featureTypes Feature types. - * @param {Array.<*>} objectStack Node stack. + * @param {Array} featureTypes Feature types. + * @param {Array<*>} objectStack Node stack. */ function writeGetFeature(node, featureTypes, objectStack) { const context = /** @type {Object} */ (objectStack[objectStack.length - 1]); diff --git a/src/ol/format/WKT.js b/src/ol/format/WKT.js index 236c718f5e..468a93ee07 100644 --- a/src/ol/format/WKT.js +++ b/src/ol/format/WKT.js @@ -321,7 +321,7 @@ class Parser { } /** - * @return {!Array.} A collection of geometries. + * @return {!Array} A collection of geometries. * @private */ parseGeometryCollectionText_() { @@ -340,7 +340,7 @@ class Parser { } /** - * @return {Array.} All values in a point. + * @return {Array} All values in a point. * @private */ parsePointText_() { @@ -356,7 +356,7 @@ class Parser { } /** - * @return {!Array.>} All points in a linestring. + * @return {!Array>} All points in a linestring. * @private */ parseLineStringText_() { @@ -372,7 +372,7 @@ class Parser { } /** - * @return {!Array.>} All points in a polygon. + * @return {!Array>} All points in a polygon. * @private */ parsePolygonText_() { @@ -388,7 +388,7 @@ class Parser { } /** - * @return {!Array.>} All points in a multipoint. + * @return {!Array>} All points in a multipoint. * @private */ parseMultiPointText_() { @@ -409,7 +409,7 @@ class Parser { } /** - * @return {!Array.>} All linestring points + * @return {!Array>} All linestring points * in a multilinestring. * @private */ @@ -426,7 +426,7 @@ class Parser { } /** - * @return {!Array.>} All polygon points in a multipolygon. + * @return {!Array>} All polygon points in a multipolygon. * @private */ parseMultiPolygonText_() { @@ -442,7 +442,7 @@ class Parser { } /** - * @return {!Array.} A point. + * @return {!Array} A point. * @private */ parsePoint_() { @@ -463,7 +463,7 @@ class Parser { } /** - * @return {!Array.>} An array of points. + * @return {!Array>} An array of points. * @private */ parsePointList_() { @@ -475,7 +475,7 @@ class Parser { } /** - * @return {!Array.>} An array of points. + * @return {!Array>} An array of points. * @private */ parsePointTextList_() { @@ -487,7 +487,7 @@ class Parser { } /** - * @return {!Array.>} An array of points. + * @return {!Array>} An array of points. * @private */ parseLineStringTextList_() { @@ -499,7 +499,7 @@ class Parser { } /** - * @return {!Array.>} An array of points. + * @return {!Array>} An array of points. * @private */ parsePolygonTextList_() { diff --git a/src/ol/format/WMSCapabilities.js b/src/ol/format/WMSCapabilities.js index 1cb7a19c3b..2d14b3d155 100644 --- a/src/ol/format/WMSCapabilities.js +++ b/src/ol/format/WMSCapabilities.js @@ -10,7 +10,7 @@ import {makeArrayPusher, makeObjectPropertyPusher, makeObjectPropertySetter, /** * @const - * @type {Array.} + * @type {Array} */ const NAMESPACE_URIS = [ null, @@ -287,7 +287,7 @@ const KEYWORDLIST_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Attribution object. */ function readAttribution(node, objectStack) { @@ -297,7 +297,7 @@ function readAttribution(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object} Bounding box object. */ function readBoundingBox(node, objectStack) { @@ -323,7 +323,7 @@ function readBoundingBox(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {module:ol/extent~Extent|undefined} Bounding box object. */ function readEXGeographicBoundingBox(node, objectStack) { @@ -355,7 +355,7 @@ function readEXGeographicBoundingBox(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Capability object. */ function readCapability(node, objectStack) { @@ -365,7 +365,7 @@ function readCapability(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Service object. */ function readService(node, objectStack) { @@ -375,7 +375,7 @@ function readService(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Contact information object. */ function readContactInformation(node, objectStack) { @@ -385,7 +385,7 @@ function readContactInformation(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Contact person object. */ function readContactPersonPrimary(node, objectStack) { @@ -395,7 +395,7 @@ function readContactPersonPrimary(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Contact address object. */ function readContactAddress(node, objectStack) { @@ -405,8 +405,8 @@ function readContactAddress(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. - * @return {Array.|undefined} Format array. + * @param {Array<*>} objectStack Object stack. + * @return {Array|undefined} Format array. */ function readException(node, objectStack) { return pushParseAndPop([], EXCEPTION_PARSERS, node, objectStack); @@ -415,7 +415,7 @@ function readException(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Layer object. */ function readCapabilityLayer(node, objectStack) { @@ -425,7 +425,7 @@ function readCapabilityLayer(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Layer object. */ function readLayer(node, objectStack) { @@ -497,7 +497,7 @@ function readLayer(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object} Dimension object. */ function readDimension(node, objectStack) { @@ -517,7 +517,7 @@ function readDimension(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Online resource object. */ function readFormatOnlineresource(node, objectStack) { @@ -527,7 +527,7 @@ function readFormatOnlineresource(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Request object. */ function readRequest(node, objectStack) { @@ -537,7 +537,7 @@ function readRequest(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} DCP type object. */ function readDCPType(node, objectStack) { @@ -547,7 +547,7 @@ function readDCPType(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} HTTP object. */ function readHTTP(node, objectStack) { @@ -557,7 +557,7 @@ function readHTTP(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Operation type object. */ function readOperationType(node, objectStack) { @@ -567,7 +567,7 @@ function readOperationType(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Online resource object. */ function readSizedFormatOnlineresource(node, objectStack) { @@ -586,7 +586,7 @@ function readSizedFormatOnlineresource(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Authority URL object. */ function readAuthorityURL(node, objectStack) { @@ -601,7 +601,7 @@ function readAuthorityURL(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Metadata URL object. */ function readMetadataURL(node, objectStack) { @@ -616,7 +616,7 @@ function readMetadataURL(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Style object. */ function readStyle(node, objectStack) { @@ -626,8 +626,8 @@ function readStyle(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. - * @return {Array.|undefined} Keyword list. + * @param {Array<*>} objectStack Object stack. + * @return {Array|undefined} Keyword list. */ function readKeywordList(node, objectStack) { return pushParseAndPop([], KEYWORDLIST_PARSERS, node, objectStack); diff --git a/src/ol/format/WMSGetFeatureInfo.js b/src/ol/format/WMSGetFeatureInfo.js index 9fb91b66f2..9c1c8a3f5f 100644 --- a/src/ol/format/WMSGetFeatureInfo.js +++ b/src/ol/format/WMSGetFeatureInfo.js @@ -10,7 +10,7 @@ import {makeArrayPusher, makeStructureNS, pushParseAndPop} from '../xml.js'; /** * @typedef {Object} Options - * @property {Array.} [layers] If set, only features of the given layers will be returned by the format when read. + * @property {Array} [layers] If set, only features of the given layers will be returned by the format when read. */ @@ -61,20 +61,20 @@ class WMSGetFeatureInfo extends XMLFeature { /** * @private - * @type {Array.} + * @type {Array} */ this.layers_ = options.layers ? options.layers : null; } /** - * @return {Array.} layers + * @return {Array} layers */ getLayers() { return this.layers_; } /** - * @param {Array.} layers Layers to parse. + * @param {Array} layers Layers to parse. */ setLayers(layers) { this.layers_ = layers; @@ -82,14 +82,14 @@ class WMSGetFeatureInfo extends XMLFeature { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. - * @return {Array.} Features. + * @param {Array<*>} objectStack Object stack. + * @return {Array} Features. * @private */ readFeatures_(node, objectStack) { node.setAttribute('namespaceURI', this.featureNS_); const localName = node.localName; - /** @type {Array.} */ + /** @type {Array} */ let features = []; if (node.childNodes.length === 0) { return features; diff --git a/src/ol/format/WMTSCapabilities.js b/src/ol/format/WMTSCapabilities.js index f42a7587dc..300fd40564 100644 --- a/src/ol/format/WMTSCapabilities.js +++ b/src/ol/format/WMTSCapabilities.js @@ -12,7 +12,7 @@ import {pushParseAndPop, makeStructureNS, /** * @const - * @type {Array.} + * @type {Array} */ const NAMESPACE_URIS = [ null, @@ -22,7 +22,7 @@ const NAMESPACE_URIS = [ /** * @const - * @type {Array.} + * @type {Array} */ const OWS_NAMESPACE_URIS = [ null, @@ -219,7 +219,7 @@ const TM_PARSERS = makeStructureNS( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Attribution object. */ function readContents(node, objectStack) { @@ -229,7 +229,7 @@ function readContents(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Layers object. */ function readLayer(node, objectStack) { @@ -239,7 +239,7 @@ function readLayer(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Tile Matrix Set object. */ function readTileMatrixSet(node, objectStack) { @@ -249,7 +249,7 @@ function readTileMatrixSet(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Style object. */ function readStyle(node, objectStack) { @@ -266,7 +266,7 @@ function readStyle(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Tile Matrix Set Link object. */ function readTileMatrixSetLink(node, objectStack) { @@ -276,7 +276,7 @@ function readTileMatrixSetLink(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Dimension object. */ function readDimensions(node, objectStack) { @@ -286,7 +286,7 @@ function readDimensions(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Resource URL object. */ function readResourceUrl(node, objectStack) { @@ -309,7 +309,7 @@ function readResourceUrl(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} WGS84 BBox object. */ function readWgs84BoundingBox(node, objectStack) { @@ -323,7 +323,7 @@ function readWgs84BoundingBox(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Legend object. */ function readLegendUrl(node, objectStack) { @@ -336,7 +336,7 @@ function readLegendUrl(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} Coordinates object. */ function readCoordinates(node, objectStack) { @@ -355,7 +355,7 @@ function readCoordinates(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} TileMatrix object. */ function readTileMatrix(node, objectStack) { @@ -365,7 +365,7 @@ function readTileMatrix(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} TileMatrixSetLimits Object. */ function readTileMatrixLimitsList(node, objectStack) { @@ -375,7 +375,7 @@ function readTileMatrixLimitsList(node, objectStack) { /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @return {Object|undefined} TileMatrixLimits Array. */ function readTileMatrixLimits(node, objectStack) { diff --git a/src/ol/format/XMLFeature.js b/src/ol/format/XMLFeature.js index 38f543698b..38d0ac80e2 100644 --- a/src/ol/format/XMLFeature.js +++ b/src/ol/format/XMLFeature.js @@ -82,7 +82,7 @@ class XMLFeature extends FeatureFormat { * @function * @param {Document|Node|Object|string} source Source. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options. - * @return {Array.} Features. + * @return {Array} Features. * @api */ readFeatures(source, opt_options) { @@ -103,10 +103,10 @@ class XMLFeature extends FeatureFormat { * @param {Document} doc Document. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options. * @protected - * @return {Array.} Features. + * @return {Array} Features. */ readFeaturesFromDocument(doc, opt_options) { - /** @type {Array.} */ + /** @type {Array} */ const features = []; for (let n = doc.firstChild; n; n = n.nextSibling) { if (n.nodeType == Node.ELEMENT_NODE) { @@ -121,7 +121,7 @@ class XMLFeature extends FeatureFormat { * @param {Node} node Node. * @param {module:ol/format/Feature~ReadOptions=} opt_options Options. * @protected - * @return {Array.} Features. + * @return {Array} Features. */ readFeaturesFromNode(node, opt_options) {} @@ -221,7 +221,7 @@ class XMLFeature extends FeatureFormat { /** * Encode an array of features as string. * - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Write options. * @return {string} Result. * @api @@ -232,7 +232,7 @@ class XMLFeature extends FeatureFormat { } /** - * @param {Array.} features Features. + * @param {Array} features Features. * @param {module:ol/format/Feature~WriteOptions=} opt_options Options. * @return {Node} Node. */ diff --git a/src/ol/format/filter/LogicalNary.js b/src/ol/format/filter/LogicalNary.js index 425e3e9ab9..e881137e70 100644 --- a/src/ol/format/filter/LogicalNary.js +++ b/src/ol/format/filter/LogicalNary.js @@ -22,7 +22,7 @@ class LogicalNary extends Filter { super(tagName); /** - * @type {Array.} + * @type {Array} */ this.conditions = Array.prototype.slice.call(arguments, 1); assert(this.conditions.length >= 2, 57); // At least 2 conditions are required. diff --git a/src/ol/geom/Circle.js b/src/ol/geom/Circle.js index e5c9e59074..4319ec62b0 100644 --- a/src/ol/geom/Circle.js +++ b/src/ol/geom/Circle.js @@ -179,7 +179,7 @@ class Circle extends SimpleGeometry { if (!this.flatCoordinates) { this.flatCoordinates = []; } - /** @type {Array.} */ + /** @type {Array} */ const flatCoordinates = this.flatCoordinates; let offset = deflateCoordinate( flatCoordinates, 0, center, this.stride); diff --git a/src/ol/geom/GeometryCollection.js b/src/ol/geom/GeometryCollection.js index b06c0bc3ec..5d5ac71656 100644 --- a/src/ol/geom/GeometryCollection.js +++ b/src/ol/geom/GeometryCollection.js @@ -17,7 +17,7 @@ import {clear} from '../obj.js'; class GeometryCollection extends Geometry { /** - * @param {Array.=} opt_geometries Geometries. + * @param {Array=} opt_geometries Geometries. */ constructor(opt_geometries) { @@ -25,7 +25,7 @@ class GeometryCollection extends Geometry { /** * @private - * @type {Array.} + * @type {Array} */ this.geometries_ = opt_geometries ? opt_geometries : null; @@ -114,7 +114,7 @@ class GeometryCollection extends Geometry { /** * Return the geometries that make up this geometry collection. - * @return {Array.} Geometries. + * @return {Array} Geometries. * @api */ getGeometries() { @@ -122,7 +122,7 @@ class GeometryCollection extends Geometry { } /** - * @return {Array.} Geometries. + * @return {Array} Geometries. */ getGeometriesArray() { return this.geometries_; @@ -228,7 +228,7 @@ class GeometryCollection extends Geometry { /** * Set the geometries that make up this geometry collection. - * @param {Array.} geometries Geometries. + * @param {Array} geometries Geometries. * @api */ setGeometries(geometries) { @@ -236,7 +236,7 @@ class GeometryCollection extends Geometry { } /** - * @param {Array.} geometries Geometries. + * @param {Array} geometries Geometries. */ setGeometriesArray(geometries) { this.unlistenGeometriesChange_(); @@ -283,8 +283,8 @@ class GeometryCollection extends Geometry { /** - * @param {Array.} geometries Geometries. - * @return {Array.} Cloned geometries. + * @param {Array} geometries Geometries. + * @return {Array} Cloned geometries. */ function cloneGeometries(geometries) { const clonedGeometries = []; diff --git a/src/ol/geom/LineString.js b/src/ol/geom/LineString.js index 9a61e850dc..90d75bbb47 100644 --- a/src/ol/geom/LineString.js +++ b/src/ol/geom/LineString.js @@ -24,7 +24,7 @@ import {douglasPeucker} from '../geom/flat/simplify.js'; class LineString extends SimpleGeometry { /** - * @param {Array.|Array.} coordinates Coordinates. + * @param {Array|Array} coordinates Coordinates. * For internal use, flat coordinates in combination with `opt_layout` are also accepted. * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. */ @@ -146,7 +146,7 @@ class LineString extends SimpleGeometry { /** * Return the coordinates of the linestring. - * @return {Array.} Coordinates. + * @return {Array} Coordinates. * @override * @api */ @@ -182,7 +182,7 @@ class LineString extends SimpleGeometry { } /** - * @return {Array.} Flat midpoint. + * @return {Array} Flat midpoint. */ getFlatMidpoint() { if (this.flatMidpointRevision_ != this.getRevision()) { @@ -223,7 +223,7 @@ class LineString extends SimpleGeometry { /** * Set the coordinates of the linestring. - * @param {!Array.} coordinates Coordinates. + * @param {!Array} coordinates Coordinates. * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. * @override * @api diff --git a/src/ol/geom/LinearRing.js b/src/ol/geom/LinearRing.js index 6f21242d1f..a4e2750de6 100644 --- a/src/ol/geom/LinearRing.js +++ b/src/ol/geom/LinearRing.js @@ -21,7 +21,7 @@ import {douglasPeucker} from '../geom/flat/simplify.js'; class LinearRing extends SimpleGeometry { /** - * @param {Array.|Array.} coordinates Coordinates. + * @param {Array|Array} coordinates Coordinates. * For internal use, flat coordinates in combination with `opt_layout` are also accepted. * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. */ @@ -87,7 +87,7 @@ class LinearRing extends SimpleGeometry { /** * Return the coordinates of the linear ring. - * @return {Array.} Coordinates. + * @return {Array} Coordinates. * @override * @api */ @@ -122,7 +122,7 @@ class LinearRing extends SimpleGeometry { /** * Set the coordinates of the linear ring. - * @param {!Array.} coordinates Coordinates. + * @param {!Array} coordinates Coordinates. * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. * @override * @api diff --git a/src/ol/geom/MultiLineString.js b/src/ol/geom/MultiLineString.js index 669ea2b3f0..f5c9db22a2 100644 --- a/src/ol/geom/MultiLineString.js +++ b/src/ol/geom/MultiLineString.js @@ -23,18 +23,18 @@ import {douglasPeuckerArray} from '../geom/flat/simplify.js'; class MultiLineString extends SimpleGeometry { /** - * @param {Array.|module:ol/geom~MultiLineString>|Array.} coordinates + * @param {Array|module:ol/geom~MultiLineString>|Array} coordinates * Coordinates or LineString geometries. (For internal use, flat coordinates in * combination with `opt_layout` and `opt_ends` are also accepted.) * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. - * @param {Array.} opt_ends Flat coordinate ends for internal use. + * @param {Array} opt_ends Flat coordinate ends for internal use. */ constructor(coordinates, opt_layout, opt_ends) { super(); /** - * @type {Array.} + * @type {Array} * @private */ this.ends_ = []; @@ -152,7 +152,7 @@ class MultiLineString extends SimpleGeometry { /** * Return the coordinates of the multilinestring. - * @return {Array.>} Coordinates. + * @return {Array>} Coordinates. * @override * @api */ @@ -162,7 +162,7 @@ class MultiLineString extends SimpleGeometry { } /** - * @return {Array.} Ends. + * @return {Array} Ends. */ getEnds() { return this.ends_; @@ -184,14 +184,14 @@ class MultiLineString extends SimpleGeometry { /** * Return the linestrings of this multilinestring. - * @return {Array.} LineStrings. + * @return {Array} LineStrings. * @api */ getLineStrings() { const flatCoordinates = this.flatCoordinates; const ends = this.ends_; const layout = this.layout; - /** @type {Array.} */ + /** @type {Array} */ const lineStrings = []; let offset = 0; for (let i = 0, ii = ends.length; i < ii; ++i) { @@ -204,7 +204,7 @@ class MultiLineString extends SimpleGeometry { } /** - * @return {Array.} Flat midpoints. + * @return {Array} Flat midpoints. */ getFlatMidpoints() { const midpoints = []; @@ -253,7 +253,7 @@ class MultiLineString extends SimpleGeometry { /** * Set the coordinates of the multilinestring. - * @param {!Array.>} coordinates Coordinates. + * @param {!Array>} coordinates Coordinates. * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. * @override * @api diff --git a/src/ol/geom/MultiPoint.js b/src/ol/geom/MultiPoint.js index 834ea037ad..0a9e183f69 100644 --- a/src/ol/geom/MultiPoint.js +++ b/src/ol/geom/MultiPoint.js @@ -19,7 +19,7 @@ import {squaredDistance as squaredDx} from '../math.js'; class MultiPoint extends SimpleGeometry { /** - * @param {Array.|Array.} coordinates Coordinates. + * @param {Array|Array} coordinates Coordinates. * For internal use, flat coordinates in combination with `opt_layout` are also accepted. * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. */ @@ -82,7 +82,7 @@ class MultiPoint extends SimpleGeometry { /** * Return the coordinates of the multipoint. - * @return {Array.} Coordinates. + * @return {Array} Coordinates. * @override * @api */ @@ -108,14 +108,14 @@ class MultiPoint extends SimpleGeometry { /** * Return the points of this multipoint. - * @return {Array.} Points. + * @return {Array} Points. * @api */ getPoints() { const flatCoordinates = this.flatCoordinates; const layout = this.layout; const stride = this.stride; - /** @type {Array.} */ + /** @type {Array} */ const points = []; for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) { const point = new Point(flatCoordinates.slice(i, i + stride), layout); @@ -151,7 +151,7 @@ class MultiPoint extends SimpleGeometry { /** * Set the coordinates of the multipoint. - * @param {!Array.} coordinates Coordinates. + * @param {!Array} coordinates Coordinates. * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. * @override * @api diff --git a/src/ol/geom/MultiPolygon.js b/src/ol/geom/MultiPolygon.js index 0235a6e175..17d8bc415c 100644 --- a/src/ol/geom/MultiPolygon.js +++ b/src/ol/geom/MultiPolygon.js @@ -28,17 +28,17 @@ import {quantizeMultiArray} from '../geom/flat/simplify.js'; class MultiPolygon extends SimpleGeometry { /** - * @param {Array.>>|Array.} coordinates Coordinates. + * @param {Array>>|Array} coordinates Coordinates. * For internal use, flat coordinats in combination with `opt_layout` and `opt_endss` are also accepted. * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. - * @param {Array.} opt_endss Array of ends for internal use with flat coordinates. + * @param {Array} opt_endss Array of ends for internal use with flat coordinates. */ constructor(coordinates, opt_layout, opt_endss) { super(); /** - * @type {Array.>} + * @type {Array>} * @private */ this.endss_ = []; @@ -51,7 +51,7 @@ class MultiPolygon extends SimpleGeometry { /** * @private - * @type {Array.} + * @type {Array} */ this.flatInteriorPoints_ = null; @@ -75,7 +75,7 @@ class MultiPolygon extends SimpleGeometry { /** * @private - * @type {Array.} + * @type {Array} */ this.orientedFlatCoordinates_ = null; @@ -115,7 +115,7 @@ class MultiPolygon extends SimpleGeometry { * @api */ appendPolygon(polygon) { - /** @type {Array.} */ + /** @type {Array} */ let ends; if (!this.flatCoordinates) { this.flatCoordinates = polygon.getFlatCoordinates().slice(); @@ -193,7 +193,7 @@ class MultiPolygon extends SimpleGeometry { * (clockwise for exterior and counter-clockwise for interior rings). * By default, coordinate orientation will depend on how the geometry was * constructed. - * @return {Array.>>} Coordinates. + * @return {Array>>} Coordinates. * @override * @api */ @@ -212,14 +212,14 @@ class MultiPolygon extends SimpleGeometry { } /** - * @return {Array.>} Endss. + * @return {Array>} Endss. */ getEndss() { return this.endss_; } /** - * @return {Array.} Flat interior points. + * @return {Array} Flat interior points. */ getFlatInteriorPoints() { if (this.flatInteriorPointsRevision_ != this.getRevision()) { @@ -244,7 +244,7 @@ class MultiPolygon extends SimpleGeometry { } /** - * @return {Array.} Oriented flat coordinates. + * @return {Array} Oriented flat coordinates. */ getOrientedFlatCoordinates() { if (this.orientedRevision_ != this.getRevision()) { @@ -305,7 +305,7 @@ class MultiPolygon extends SimpleGeometry { /** * Return the polygons of this multipolygon. - * @return {Array.} Polygons. + * @return {Array} Polygons. * @api */ getPolygons() { @@ -348,7 +348,7 @@ class MultiPolygon extends SimpleGeometry { /** * Set the coordinates of the multipolygon. - * @param {!Array.>>} coordinates Coordinates. + * @param {!Array>>} coordinates Coordinates. * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. * @override * @api diff --git a/src/ol/geom/Polygon.js b/src/ol/geom/Polygon.js index 14a6634eef..35562d97e3 100644 --- a/src/ol/geom/Polygon.js +++ b/src/ol/geom/Polygon.js @@ -29,7 +29,7 @@ import {modulo} from '../math.js'; class Polygon extends SimpleGeometry { /** - * @param {!Array.>|!Array.} coordinates + * @param {!Array>|!Array} coordinates * Array of linear rings that define the polygon. The first linear ring of the * array defines the outer-boundary or surface of the polygon. Each subsequent * linear ring defines a hole in the surface of the polygon. A linear ring is @@ -37,14 +37,14 @@ class Polygon extends SimpleGeometry { * equivalent. (For internal use, flat coordinates in combination with * `opt_layout` and `opt_ends` are also accepted.) * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. - * @param {Array.=} opt_ends Ends (for internal use with flat coordinates). + * @param {Array=} opt_ends Ends (for internal use with flat coordinates). */ constructor(coordinates, opt_layout, opt_ends) { super(); /** - * @type {Array.} + * @type {Array} * @private */ this.ends_ = []; @@ -81,7 +81,7 @@ class Polygon extends SimpleGeometry { /** * @private - * @type {Array.} + * @type {Array} */ this.orientedFlatCoordinates_ = null; @@ -162,7 +162,7 @@ class Polygon extends SimpleGeometry { * (clockwise for exterior and counter-clockwise for interior rings). * By default, coordinate orientation will depend on how the geometry was * constructed. - * @return {Array.>} Coordinates. + * @return {Array>} Coordinates. * @override * @api */ @@ -181,14 +181,14 @@ class Polygon extends SimpleGeometry { } /** - * @return {Array.} Ends. + * @return {Array} Ends. */ getEnds() { return this.ends_; } /** - * @return {Array.} Interior point. + * @return {Array} Interior point. */ getFlatInteriorPoint() { if (this.flatInteriorPointRevision_ != this.getRevision()) { @@ -242,7 +242,7 @@ class Polygon extends SimpleGeometry { /** * Return the linear rings of the polygon. - * @return {Array.} Linear rings. + * @return {Array} Linear rings. * @api */ getLinearRings() { @@ -261,7 +261,7 @@ class Polygon extends SimpleGeometry { } /** - * @return {Array.} Oriented flat coordinates. + * @return {Array} Oriented flat coordinates. */ getOrientedFlatCoordinates() { if (this.orientedRevision_ != this.getRevision()) { @@ -312,7 +312,7 @@ class Polygon extends SimpleGeometry { /** * Set the coordinates of the polygon. - * @param {!Array.>} coordinates Coordinates. + * @param {!Array>} coordinates Coordinates. * @param {module:ol/geom/GeometryLayout=} opt_layout Layout. * @override * @api @@ -347,7 +347,7 @@ export default Polygon; */ export function circular(center, radius, opt_n, opt_sphereRadius) { const n = opt_n ? opt_n : 32; - /** @type {Array.} */ + /** @type {Array} */ const flatCoordinates = []; for (let i = 0; i < n; ++i) { extend(flatCoordinates, sphereOffset(center, radius, 2 * Math.PI * i / n, opt_sphereRadius)); diff --git a/src/ol/geom/SimpleGeometry.js b/src/ol/geom/SimpleGeometry.js index 0ac4a68662..001ce60db7 100644 --- a/src/ol/geom/SimpleGeometry.js +++ b/src/ol/geom/SimpleGeometry.js @@ -35,7 +35,7 @@ class SimpleGeometry extends Geometry { /** * @protected - * @type {Array.} + * @type {Array} */ this.flatCoordinates = null; @@ -65,7 +65,7 @@ class SimpleGeometry extends Geometry { } /** - * @return {Array.} Flat coordinates. + * @return {Array} Flat coordinates. */ getFlatCoordinates() { return this.flatCoordinates; @@ -146,7 +146,7 @@ class SimpleGeometry extends Geometry { /** * @param {module:ol/geom/GeometryLayout} layout Layout. - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. */ setFlatCoordinates(layout, flatCoordinates) { this.stride = getStrideForLayout(layout); @@ -300,8 +300,8 @@ SimpleGeometry.prototype.containsXY = FALSE; /** * @param {module:ol/geom/SimpleGeometry} simpleGeometry Simple geometry. * @param {module:ol/transform~Transform} transform Transform. - * @param {Array.=} opt_dest Destination. - * @return {Array.} Transformed flat coordinates. + * @param {Array=} opt_dest Destination. + * @return {Array} Transformed flat coordinates. */ export function transformGeom2D(simpleGeometry, transform, opt_dest) { const flatCoordinates = simpleGeometry.getFlatCoordinates(); diff --git a/src/ol/geom/flat/area.js b/src/ol/geom/flat/area.js index b9de7021c5..935271c074 100644 --- a/src/ol/geom/flat/area.js +++ b/src/ol/geom/flat/area.js @@ -4,7 +4,7 @@ /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -26,9 +26,9 @@ export function linearRing(flatCoordinates, offset, end, stride) { /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @return {number} Area. */ @@ -44,9 +44,9 @@ export function linearRings(flatCoordinates, offset, ends, stride) { /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Endss. + * @param {Array>} endss Endss. * @param {number} stride Stride. * @return {number} Area. */ diff --git a/src/ol/geom/flat/center.js b/src/ol/geom/flat/center.js index 2e5b6519f2..f08b0a9372 100644 --- a/src/ol/geom/flat/center.js +++ b/src/ol/geom/flat/center.js @@ -5,11 +5,11 @@ import {createEmpty, createOrUpdateFromFlatCoordinates} from '../../extent.js'; /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Endss. + * @param {Array>} endss Endss. * @param {number} stride Stride. - * @return {Array.} Flat centers. + * @return {Array} Flat centers. */ export function linearRingss(flatCoordinates, offset, endss, stride) { const flatCenters = []; diff --git a/src/ol/geom/flat/closest.js b/src/ol/geom/flat/closest.js index 878944777f..a49ed32b9f 100644 --- a/src/ol/geom/flat/closest.js +++ b/src/ol/geom/flat/closest.js @@ -8,13 +8,13 @@ import {lerp, squaredDistance as squaredDx} from '../../math.js'; * Returns the point on the 2D line segment flatCoordinates[offset1] to * flatCoordinates[offset2] that is closest to the point (x, y). Extra * dimensions are linearly interpolated. - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset1 Offset 1. * @param {number} offset2 Offset 2. * @param {number} stride Stride. * @param {number} x X. * @param {number} y Y. - * @param {Array.} closestPoint Closest point. + * @param {Array} closestPoint Closest point. */ function assignClosest(flatCoordinates, offset1, offset2, stride, x, y, closestPoint) { const x1 = flatCoordinates[offset1]; @@ -49,7 +49,7 @@ function assignClosest(flatCoordinates, offset1, offset2, stride, x, y, closestP /** * Return the squared of the largest distance between any pair of consecutive * coordinates. - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -74,9 +74,9 @@ export function maxSquaredDelta(flatCoordinates, offset, end, stride, max) { /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @param {number} max Max squared delta. * @return {number} Max squared delta. @@ -93,9 +93,9 @@ export function arrayMaxSquaredDelta(flatCoordinates, offset, ends, stride, max) /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Endss. + * @param {Array>} endss Endss. * @param {number} stride Stride. * @param {number} max Max squared delta. * @return {number} Max squared delta. @@ -112,7 +112,7 @@ export function multiArrayMaxSquaredDelta(flatCoordinates, offset, endss, stride /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -120,9 +120,9 @@ export function multiArrayMaxSquaredDelta(flatCoordinates, offset, endss, stride * @param {boolean} isRing Is ring. * @param {number} x X. * @param {number} y Y. - * @param {Array.} closestPoint Closest point. + * @param {Array} closestPoint Closest point. * @param {number} minSquaredDistance Minimum squared distance. - * @param {Array.=} opt_tmpPoint Temporary point object. + * @param {Array=} opt_tmpPoint Temporary point object. * @return {number} Minimum squared distance. */ export function assignClosestPoint(flatCoordinates, offset, end, @@ -193,17 +193,17 @@ export function assignClosestPoint(flatCoordinates, offset, end, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @param {number} maxDelta Max delta. * @param {boolean} isRing Is ring. * @param {number} x X. * @param {number} y Y. - * @param {Array.} closestPoint Closest point. + * @param {Array} closestPoint Closest point. * @param {number} minSquaredDistance Minimum squared distance. - * @param {Array.=} opt_tmpPoint Temporary point object. + * @param {Array=} opt_tmpPoint Temporary point object. * @return {number} Minimum squared distance. */ export function assignClosestArrayPoint(flatCoordinates, offset, ends, @@ -222,17 +222,17 @@ export function assignClosestArrayPoint(flatCoordinates, offset, ends, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Endss. + * @param {Array>} endss Endss. * @param {number} stride Stride. * @param {number} maxDelta Max delta. * @param {boolean} isRing Is ring. * @param {number} x X. * @param {number} y Y. - * @param {Array.} closestPoint Closest point. + * @param {Array} closestPoint Closest point. * @param {number} minSquaredDistance Minimum squared distance. - * @param {Array.=} opt_tmpPoint Temporary point object. + * @param {Array=} opt_tmpPoint Temporary point object. * @return {number} Minimum squared distance. */ export function assignClosestMultiArrayPoint(flatCoordinates, offset, diff --git a/src/ol/geom/flat/contains.js b/src/ol/geom/flat/contains.js index 176a1ed23a..e48bd0fd26 100644 --- a/src/ol/geom/flat/contains.js +++ b/src/ol/geom/flat/contains.js @@ -5,7 +5,7 @@ import {forEachCorner} from '../../extent.js'; /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -26,7 +26,7 @@ export function linearRingContainsExtent(flatCoordinates, offset, end, stride, e /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -63,9 +63,9 @@ export function linearRingContainsXY(flatCoordinates, offset, end, stride, x, y) /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @param {number} x X. * @param {number} y Y. @@ -88,9 +88,9 @@ export function linearRingsContainsXY(flatCoordinates, offset, ends, stride, x, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Endss. + * @param {Array>} endss Endss. * @param {number} stride Stride. * @param {number} x X. * @param {number} y Y. diff --git a/src/ol/geom/flat/deflate.js b/src/ol/geom/flat/deflate.js index ccc78d5f49..3f6b319069 100644 --- a/src/ol/geom/flat/deflate.js +++ b/src/ol/geom/flat/deflate.js @@ -4,7 +4,7 @@ /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {module:ol/coordinate~Coordinate} coordinate Coordinate. * @param {number} stride Stride. @@ -19,9 +19,9 @@ export function deflateCoordinate(flatCoordinates, offset, coordinate, stride) { /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} coordinates Coordinates. + * @param {Array} coordinates Coordinates. * @param {number} stride Stride. * @return {number} offset Offset. */ @@ -37,12 +37,12 @@ export function deflateCoordinates(flatCoordinates, offset, coordinates, stride) /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} coordinatess Coordinatess. + * @param {Array>} coordinatess Coordinatess. * @param {number} stride Stride. - * @param {Array.=} opt_ends Ends. - * @return {Array.} Ends. + * @param {Array=} opt_ends Ends. + * @return {Array} Ends. */ export function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, stride, opt_ends) { const ends = opt_ends ? opt_ends : []; @@ -59,12 +59,12 @@ export function deflateCoordinatesArray(flatCoordinates, offset, coordinatess, s /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>>} coordinatesss Coordinatesss. + * @param {Array>>} coordinatesss Coordinatesss. * @param {number} stride Stride. - * @param {Array.>=} opt_endss Endss. - * @return {Array.>} Endss. + * @param {Array>=} opt_endss Endss. + * @return {Array>} Endss. */ export function deflateMultiCoordinatesArray(flatCoordinates, offset, coordinatesss, stride, opt_endss) { const endss = opt_endss ? opt_endss : []; diff --git a/src/ol/geom/flat/flip.js b/src/ol/geom/flat/flip.js index 4e434a892a..428c3d2f67 100644 --- a/src/ol/geom/flat/flip.js +++ b/src/ol/geom/flat/flip.js @@ -4,13 +4,13 @@ /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. - * @param {Array.=} opt_dest Destination. + * @param {Array=} opt_dest Destination. * @param {number=} opt_destOffset Destination offset. - * @return {Array.} Flat coordinates. + * @return {Array} Flat coordinates. */ export function flipXY(flatCoordinates, offset, end, stride, opt_dest, opt_destOffset) { let dest, destOffset; diff --git a/src/ol/geom/flat/geodesic.js b/src/ol/geom/flat/geodesic.js index 03455675ea..19d9131e1d 100644 --- a/src/ol/geom/flat/geodesic.js +++ b/src/ol/geom/flat/geodesic.js @@ -10,13 +10,13 @@ import {get as getProjection, getTransform} from '../../proj.js'; * @param {module:ol/proj~TransformFunction} transform Transform from longitude/latitude to * projected coordinates. * @param {number} squaredTolerance Squared tolerance. - * @return {Array.} Flat coordinates. + * @return {Array} Flat coordinates. */ function line(interpolate, transform, squaredTolerance) { // FIXME reduce garbage generation // FIXME optimize stack operations - /** @type {Array.} */ + /** @type {Array} */ const flatCoordinates = []; let geoA = interpolate(0); @@ -25,11 +25,11 @@ function line(interpolate, transform, squaredTolerance) { let a = transform(geoA); let b = transform(geoB); - /** @type {Array.} */ + /** @type {Array} */ const geoStack = [geoB, geoA]; - /** @type {Array.} */ + /** @type {Array} */ const stack = [b, a]; - /** @type {Array.} */ + /** @type {Array} */ const fractionStack = [1, 0]; /** @type {!Object.} */ @@ -86,7 +86,7 @@ function line(interpolate, transform, squaredTolerance) { * @param {number} lat2 Latitude 2 in degrees. * @param {module:ol/proj/Projection} projection Projection. * @param {number} squaredTolerance Squared tolerance. - * @return {Array.} Flat coordinates. + * @return {Array} Flat coordinates. */ export function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolerance) { const geoProjection = getProjection('EPSG:4326'); @@ -130,7 +130,7 @@ export function greatCircleArc(lon1, lat1, lon2, lat2, projection, squaredTolera * @param {number} lat2 Latitude 2. * @param {module:ol/proj/Projection} projection Projection. * @param {number} squaredTolerance Squared tolerance. - * @return {Array.} Flat coordinates. + * @return {Array} Flat coordinates. */ export function meridian(lon, lat1, lat2, projection, squaredTolerance) { const epsg4326Projection = getProjection('EPSG:4326'); @@ -153,7 +153,7 @@ export function meridian(lon, lat1, lat2, projection, squaredTolerance) { * @param {number} lon2 Longitude 2. * @param {module:ol/proj/Projection} projection Projection. * @param {number} squaredTolerance Squared tolerance. - * @return {Array.} Flat coordinates. + * @return {Array} Flat coordinates. */ export function parallel(lat, lon1, lon2, projection, squaredTolerance) { const epsg4326Projection = getProjection('EPSG:4326'); diff --git a/src/ol/geom/flat/inflate.js b/src/ol/geom/flat/inflate.js index f79f5b54f6..225a10290c 100644 --- a/src/ol/geom/flat/inflate.js +++ b/src/ol/geom/flat/inflate.js @@ -4,12 +4,12 @@ /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. - * @param {Array.=} opt_coordinates Coordinates. - * @return {Array.} Coordinates. + * @param {Array=} opt_coordinates Coordinates. + * @return {Array} Coordinates. */ export function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coordinates) { const coordinates = opt_coordinates !== undefined ? opt_coordinates : []; @@ -23,12 +23,12 @@ export function inflateCoordinates(flatCoordinates, offset, end, stride, opt_coo /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. - * @param {Array.>=} opt_coordinatess Coordinatess. - * @return {Array.>} Coordinatess. + * @param {Array>=} opt_coordinatess Coordinatess. + * @return {Array>} Coordinatess. */ export function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, opt_coordinatess) { const coordinatess = opt_coordinatess !== undefined ? opt_coordinatess : []; @@ -45,13 +45,13 @@ export function inflateCoordinatesArray(flatCoordinates, offset, ends, stride, o /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Endss. + * @param {Array>} endss Endss. * @param {number} stride Stride. - * @param {Array.>>=} opt_coordinatesss + * @param {Array>>=} opt_coordinatesss * Coordinatesss. - * @return {Array.>>} Coordinatesss. + * @return {Array>>} Coordinatesss. */ export function inflateMultiCoordinatesArray(flatCoordinates, offset, endss, stride, opt_coordinatesss) { const coordinatesss = opt_coordinatesss !== undefined ? opt_coordinatesss : []; diff --git a/src/ol/geom/flat/interiorpoint.js b/src/ol/geom/flat/interiorpoint.js index 98f4d56659..07b5e20c81 100644 --- a/src/ol/geom/flat/interiorpoint.js +++ b/src/ol/geom/flat/interiorpoint.js @@ -8,21 +8,21 @@ import {linearRingsContainsXY} from '../flat/contains.js'; /** * Calculates a point that is likely to lie in the interior of the linear rings. * Inspired by JTS's com.vividsolutions.jts.geom.Geometry#getInteriorPoint. - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. - * @param {Array.} flatCenters Flat centers. + * @param {Array} flatCenters Flat centers. * @param {number} flatCentersOffset Flat center offset. - * @param {Array.=} opt_dest Destination. - * @return {Array.} Destination point as XYM coordinate, where M is the + * @param {Array=} opt_dest Destination. + * @return {Array} Destination point as XYM coordinate, where M is the * length of the horizontal intersection that the point belongs to. */ export function getInteriorPointOfArray(flatCoordinates, offset, ends, stride, flatCenters, flatCentersOffset, opt_dest) { let i, ii, x, x1, x2, y1, y2; const y = flatCenters[flatCentersOffset + 1]; - /** @type {Array.} */ + /** @type {Array} */ const intersections = []; // Calculate intersections with the horizontal line for (let r = 0, rr = ends.length; r < rr; ++r) { @@ -73,12 +73,12 @@ export function getInteriorPointOfArray(flatCoordinates, offset, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Endss. + * @param {Array>} endss Endss. * @param {number} stride Stride. - * @param {Array.} flatCenters Flat centers. - * @return {Array.} Interior points as XYM coordinates, where M is the + * @param {Array} flatCenters Flat centers. + * @return {Array} Interior points as XYM coordinates, where M is the * length of the horizontal intersection that the point belongs to. */ export function getInteriorPointsOfMultiArray(flatCoordinates, offset, endss, stride, flatCenters) { diff --git a/src/ol/geom/flat/interpolate.js b/src/ol/geom/flat/interpolate.js index 444def7683..843b7e5500 100644 --- a/src/ol/geom/flat/interpolate.js +++ b/src/ol/geom/flat/interpolate.js @@ -6,13 +6,13 @@ import {lerp} from '../../math.js'; /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. * @param {number} fraction Fraction. - * @param {Array.=} opt_dest Destination. - * @return {Array.} Destination. + * @param {Array=} opt_dest Destination. + * @return {Array} Destination. */ export function interpolatePoint(flatCoordinates, offset, end, stride, fraction, opt_dest) { let pointX = NaN; @@ -65,7 +65,7 @@ export function interpolatePoint(flatCoordinates, offset, end, stride, fraction, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -126,9 +126,9 @@ export function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @param {number} m M. * @param {boolean} extrapolate Extrapolate. diff --git a/src/ol/geom/flat/intersectsextent.js b/src/ol/geom/flat/intersectsextent.js index c8e304971b..8e91a26b23 100644 --- a/src/ol/geom/flat/intersectsextent.js +++ b/src/ol/geom/flat/intersectsextent.js @@ -7,7 +7,7 @@ import {forEach as forEachSegment} from '../flat/segments.js'; /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -45,9 +45,9 @@ export function intersectsLineString(flatCoordinates, offset, end, stride, exten /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @param {module:ol/extent~Extent} extent Extent. * @return {boolean} True if the geometry and the extent intersect. @@ -65,7 +65,7 @@ export function intersectsLineStringArray(flatCoordinates, offset, ends, stride, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -94,9 +94,9 @@ export function intersectsLinearRing(flatCoordinates, offset, end, stride, exten /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @param {module:ol/extent~Extent} extent Extent. * @return {boolean} True if the geometry and the extent intersect. @@ -119,9 +119,9 @@ export function intersectsLinearRingArray(flatCoordinates, offset, ends, stride, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Endss. + * @param {Array>} endss Endss. * @param {number} stride Stride. * @param {module:ol/extent~Extent} extent Extent. * @return {boolean} True if the geometry and the extent intersect. diff --git a/src/ol/geom/flat/length.js b/src/ol/geom/flat/length.js index 3a329da814..cf475ca983 100644 --- a/src/ol/geom/flat/length.js +++ b/src/ol/geom/flat/length.js @@ -4,7 +4,7 @@ /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -26,7 +26,7 @@ export function lineStringLength(flatCoordinates, offset, end, stride) { /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. diff --git a/src/ol/geom/flat/orient.js b/src/ol/geom/flat/orient.js index 864e0a35c5..c7ba89bb03 100644 --- a/src/ol/geom/flat/orient.js +++ b/src/ol/geom/flat/orient.js @@ -5,7 +5,7 @@ import {coordinates as reverseCoordinates} from '../flat/reverse.js'; /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -33,9 +33,9 @@ export function linearRingIsClockwise(flatCoordinates, offset, end, stride) { * is tested (first ring must be clockwise, remaining rings counter-clockwise). * To test for right-hand orientation, use the `opt_right` argument. * - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Array of end indexes. + * @param {Array} ends Array of end indexes. * @param {number} stride Stride. * @param {boolean=} opt_right Test for right-hand orientation * (counter-clockwise exterior ring and clockwise interior rings). @@ -67,9 +67,9 @@ export function linearRingIsOriented(flatCoordinates, offset, ends, stride, opt_ * is tested (first ring must be clockwise, remaining rings counter-clockwise). * To test for right-hand orientation, use the `opt_right` argument. * - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Array of array of end indexes. + * @param {Array>} endss Array of array of end indexes. * @param {number} stride Stride. * @param {boolean=} opt_right Test for right-hand orientation * (counter-clockwise exterior ring and clockwise interior rings). @@ -92,9 +92,9 @@ export function linearRingsAreOriented(flatCoordinates, offset, endss, stride, o * counter-clockwise for interior rings). To orient according to the * right-hand rule, use the `opt_right` argument. * - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @param {boolean=} opt_right Follow the right-hand rule for orientation. * @return {number} End. @@ -123,9 +123,9 @@ export function orientLinearRings(flatCoordinates, offset, ends, stride, opt_rig * counter-clockwise for interior rings). To orient according to the * right-hand rule, use the `opt_right` argument. * - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Array of array of end indexes. + * @param {Array>} endss Array of array of end indexes. * @param {number} stride Stride. * @param {boolean=} opt_right Follow the right-hand rule for orientation. * @return {number} End. diff --git a/src/ol/geom/flat/reverse.js b/src/ol/geom/flat/reverse.js index bdb1e0c041..a3588608fc 100644 --- a/src/ol/geom/flat/reverse.js +++ b/src/ol/geom/flat/reverse.js @@ -4,7 +4,7 @@ /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. diff --git a/src/ol/geom/flat/segments.js b/src/ol/geom/flat/segments.js index 3db076ef13..6c28fa953e 100644 --- a/src/ol/geom/flat/segments.js +++ b/src/ol/geom/flat/segments.js @@ -7,7 +7,7 @@ * This function calls `callback` for each segment of the flat coordinates * array. If the callback returns a truthy value the function returns that * value immediately. Otherwise the function returns `false`. - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. diff --git a/src/ol/geom/flat/simplify.js b/src/ol/geom/flat/simplify.js index 393a8a362b..dda66ef4fa 100644 --- a/src/ol/geom/flat/simplify.js +++ b/src/ol/geom/flat/simplify.js @@ -31,15 +31,15 @@ import {squaredSegmentDistance, squaredDistance} from '../../math.js'; /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. * @param {number} squaredTolerance Squared tolerance. * @param {boolean} highQuality Highest quality. - * @param {Array.=} opt_simplifiedFlatCoordinates Simplified flat + * @param {Array=} opt_simplifiedFlatCoordinates Simplified flat * coordinates. - * @return {Array.} Simplified line string. + * @return {Array} Simplified line string. */ export function simplifyLineString(flatCoordinates, offset, end, stride, squaredTolerance, highQuality, opt_simplifiedFlatCoordinates) { @@ -61,12 +61,12 @@ export function simplifyLineString(flatCoordinates, offset, end, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. * @param {number} squaredTolerance Squared tolerance. - * @param {Array.} simplifiedFlatCoordinates Simplified flat + * @param {Array} simplifiedFlatCoordinates Simplified flat * coordinates. * @param {number} simplifiedOffset Simplified offset. * @return {number} Simplified offset. @@ -83,11 +83,11 @@ export function douglasPeucker(flatCoordinates, offset, end, } return simplifiedOffset; } - /** @type {Array.} */ + /** @type {Array} */ const markers = new Array(n); markers[0] = 1; markers[n - 1] = 1; - /** @type {Array.} */ + /** @type {Array} */ const stack = [offset, end - stride]; let index = 0; while (stack.length > 0) { @@ -131,15 +131,15 @@ export function douglasPeucker(flatCoordinates, offset, end, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @param {number} squaredTolerance Squared tolerance. - * @param {Array.} simplifiedFlatCoordinates Simplified flat + * @param {Array} simplifiedFlatCoordinates Simplified flat * coordinates. * @param {number} simplifiedOffset Simplified offset. - * @param {Array.} simplifiedEnds Simplified ends. + * @param {Array} simplifiedEnds Simplified ends. * @return {number} Simplified offset. */ export function douglasPeuckerArray(flatCoordinates, offset, @@ -158,15 +158,15 @@ export function douglasPeuckerArray(flatCoordinates, offset, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Endss. + * @param {Array>} endss Endss. * @param {number} stride Stride. * @param {number} squaredTolerance Squared tolerance. - * @param {Array.} simplifiedFlatCoordinates Simplified flat + * @param {Array} simplifiedFlatCoordinates Simplified flat * coordinates. * @param {number} simplifiedOffset Simplified offset. - * @param {Array.>} simplifiedEndss Simplified endss. + * @param {Array>} simplifiedEndss Simplified endss. * @return {number} Simplified offset. */ export function douglasPeuckerMultiArray( @@ -186,12 +186,12 @@ export function douglasPeuckerMultiArray( /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. * @param {number} squaredTolerance Squared tolerance. - * @param {Array.} simplifiedFlatCoordinates Simplified flat + * @param {Array} simplifiedFlatCoordinates Simplified flat * coordinates. * @param {number} simplifiedOffset Simplified offset. * @return {number} Simplified offset. @@ -253,12 +253,12 @@ export function snap(value, tolerance) { * the common edge between two polygons will be simplified to the same line * string independently in both polygons. This implementation uses a single * pass over the coordinates and eliminates intermediate collinear points. - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. * @param {number} tolerance Tolerance. - * @param {Array.} simplifiedFlatCoordinates Simplified flat + * @param {Array} simplifiedFlatCoordinates Simplified flat * coordinates. * @param {number} simplifiedOffset Simplified offset. * @return {number} Simplified offset. @@ -337,15 +337,15 @@ export function quantize(flatCoordinates, offset, end, stride, /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @param {number} tolerance Tolerance. - * @param {Array.} simplifiedFlatCoordinates Simplified flat + * @param {Array} simplifiedFlatCoordinates Simplified flat * coordinates. * @param {number} simplifiedOffset Simplified offset. - * @param {Array.} simplifiedEnds Simplified ends. + * @param {Array} simplifiedEnds Simplified ends. * @return {number} Simplified offset. */ export function quantizeArray( @@ -366,15 +366,15 @@ export function quantizeArray( /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.>} endss Endss. + * @param {Array>} endss Endss. * @param {number} stride Stride. * @param {number} tolerance Tolerance. - * @param {Array.} simplifiedFlatCoordinates Simplified flat + * @param {Array} simplifiedFlatCoordinates Simplified flat * coordinates. * @param {number} simplifiedOffset Simplified offset. - * @param {Array.>} simplifiedEndss Simplified endss. + * @param {Array>} simplifiedEndss Simplified endss. * @return {number} Simplified offset. */ export function quantizeMultiArray( diff --git a/src/ol/geom/flat/straightchunk.js b/src/ol/geom/flat/straightchunk.js index f394537724..0855825569 100644 --- a/src/ol/geom/flat/straightchunk.js +++ b/src/ol/geom/flat/straightchunk.js @@ -5,11 +5,11 @@ /** * @param {number} maxAngle Maximum acceptable angle delta between segments. - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. - * @return {Array.} Start and end of the first suitable chunk of the + * @return {Array} Start and end of the first suitable chunk of the * given `flatCoordinates`. */ export function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) { diff --git a/src/ol/geom/flat/textpath.js b/src/ol/geom/flat/textpath.js index 5b0d9648c6..f358d8791e 100644 --- a/src/ol/geom/flat/textpath.js +++ b/src/ol/geom/flat/textpath.js @@ -5,7 +5,7 @@ import {lerp} from '../../math.js'; /** - * @param {Array.} flatCoordinates Path to put text on. + * @param {Array} flatCoordinates Path to put text on. * @param {number} offset Start offset of the `flatCoordinates`. * @param {number} end End offset of the `flatCoordinates`. * @param {number} stride Stride. @@ -14,7 +14,7 @@ import {lerp} from '../../math.js'; * width of the character passed as 1st argument. * @param {number} startM m along the path where the text starts. * @param {number} maxAngle Max angle between adjacent chars in radians. - * @return {Array.>} The result array of null if `maxAngle` was + * @return {Array>} The result array of null if `maxAngle` was * exceeded. Entries of the array are x, y, anchorX, angle, chunk. */ export function drawTextOnPath( diff --git a/src/ol/geom/flat/topology.js b/src/ol/geom/flat/topology.js index e594c975f0..4149a4c24b 100644 --- a/src/ol/geom/flat/topology.js +++ b/src/ol/geom/flat/topology.js @@ -5,7 +5,7 @@ import {linearRing as linearRingArea} from '../flat/area.js'; /** * Check if the linestring is a boundary. - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. diff --git a/src/ol/geom/flat/transform.js b/src/ol/geom/flat/transform.js index 78c22f3414..1b91c0fbd3 100644 --- a/src/ol/geom/flat/transform.js +++ b/src/ol/geom/flat/transform.js @@ -4,13 +4,13 @@ /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. * @param {module:ol/transform~Transform} transform Transform. - * @param {Array.=} opt_dest Destination. - * @return {Array.} Transformed coordinates. + * @param {Array=} opt_dest Destination. + * @return {Array} Transformed coordinates. */ export function transform2D(flatCoordinates, offset, end, stride, transform, opt_dest) { const dest = opt_dest ? opt_dest : []; @@ -29,14 +29,14 @@ export function transform2D(flatCoordinates, offset, end, stride, transform, opt /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. * @param {number} angle Angle. - * @param {Array.} anchor Rotation anchor point. - * @param {Array.=} opt_dest Destination. - * @return {Array.} Transformed coordinates. + * @param {Array} anchor Rotation anchor point. + * @param {Array=} opt_dest Destination. + * @return {Array} Transformed coordinates. */ export function rotate(flatCoordinates, offset, end, stride, angle, anchor, opt_dest) { const dest = opt_dest ? opt_dest : []; @@ -63,15 +63,15 @@ export function rotate(flatCoordinates, offset, end, stride, angle, anchor, opt_ /** * Scale the coordinates. - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. * @param {number} sx Scale factor in the x-direction. * @param {number} sy Scale factor in the y-direction. - * @param {Array.} anchor Scale anchor point. - * @param {Array.=} opt_dest Destination. - * @return {Array.} Transformed coordinates. + * @param {Array} anchor Scale anchor point. + * @param {Array=} opt_dest Destination. + * @return {Array} Transformed coordinates. */ export function scale(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_dest) { const dest = opt_dest ? opt_dest : []; @@ -95,14 +95,14 @@ export function scale(flatCoordinates, offset, end, stride, sx, sy, anchor, opt_ /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. * @param {number} deltaX Delta X. * @param {number} deltaY Delta Y. - * @param {Array.=} opt_dest Destination. - * @return {Array.} Transformed coordinates. + * @param {Array=} opt_dest Destination. + * @return {Array} Transformed coordinates. */ export function translate(flatCoordinates, offset, end, stride, deltaX, deltaY, opt_dest) { const dest = opt_dest ? opt_dest : []; diff --git a/src/ol/interaction/DragAndDrop.js b/src/ol/interaction/DragAndDrop.js index ede4e3167c..7927837336 100644 --- a/src/ol/interaction/DragAndDrop.js +++ b/src/ol/interaction/DragAndDrop.js @@ -13,7 +13,7 @@ import {get as getProjection} from '../proj.js'; /** * @typedef {Object} Options - * @property {Array.} [formatConstructors] Format constructors. + * @property {Array} [formatConstructors] Format constructors. * @property {module:ol/source/Vector} [source] Optional vector source where features will be added. If a source is provided * all existing features will be removed and new features will be added when * they are dropped on the target. If you want to add features to a vector @@ -47,7 +47,7 @@ class DragAndDropEvent extends Event { /** * @param {module:ol/interaction/DragAndDrop~DragAndDropEventType} type Type. * @param {File} file File. - * @param {Array.=} opt_features Features. + * @param {Array=} opt_features Features. * @param {module:ol/proj/Projection=} opt_projection Projection. */ constructor(type, file, opt_features, opt_projection) { @@ -56,7 +56,7 @@ class DragAndDropEvent extends Event { /** * The features parsed from dropped data. - * @type {Array.|undefined} + * @type {Array|undefined} * @api */ this.features = opt_features; @@ -101,7 +101,7 @@ class DragAndDrop extends Interaction { /** * @private - * @type {Array.} + * @type {Array} */ this.formatConstructors_ = options.formatConstructors ? options.formatConstructors : []; @@ -115,7 +115,7 @@ class DragAndDrop extends Interaction { /** * @private - * @type {Array.} + * @type {Array} */ this.dropListenKeys_ = null; @@ -220,7 +220,7 @@ class DragAndDrop extends Interaction { * @param {string} text Text. * @param {module:ol/format/Feature~ReadOptions} options Read options. * @private - * @return {Array.} Features. + * @return {Array} Features. */ tryReadFeatures_(format, text, options) { try { diff --git a/src/ol/interaction/Draw.js b/src/ol/interaction/Draw.js index 879fcf88d2..85111f6322 100644 --- a/src/ol/interaction/Draw.js +++ b/src/ol/interaction/Draw.js @@ -56,7 +56,7 @@ import {createEditingStyle} from '../style/Style.js'; * @property {module:ol/events/condition~Condition} [finishCondition] A function * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a * boolean to indicate whether the drawing can be finished. - * @property {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} [style] + * @property {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} [style] * Style for sketch features. * @property {module:ol/interaction/Draw~GeometryFunction} [geometryFunction] * Function that is called when a geometry's coordinates are updated. @@ -86,7 +86,7 @@ import {createEditingStyle} from '../style/Style.js'; * arguments, and returns a geometry. The optional existing geometry is the * geometry that is returned when the function is called without a second * argument. - * @typedef {function(!Array., module:ol/geom/SimpleGeometry=): + * @typedef {function(!Array, module:ol/geom/SimpleGeometry=): * module:ol/geom/SimpleGeometry} GeometryFunction */ @@ -272,7 +272,7 @@ class Draw extends PointerInteraction { if (!geometryFunction) { if (this.type_ === GeometryType.CIRCLE) { /** - * @param {!Array.} coordinates + * @param {!Array} coordinates * The coordinates. * @param {module:ol/geom/SimpleGeometry=} opt_geometry Optional geometry. * @return {module:ol/geom/SimpleGeometry} A geometry. @@ -296,7 +296,7 @@ class Draw extends PointerInteraction { Constructor = Polygon; } /** - * @param {!Array.} coordinates + * @param {!Array} coordinates * The coordinates. * @param {module:ol/geom/SimpleGeometry=} opt_geometry Optional geometry. * @return {module:ol/geom/SimpleGeometry} A geometry. @@ -358,7 +358,7 @@ class Draw extends PointerInteraction { /** * Sketch coordinates. Used when drawing a line or polygon. - * @type {module:ol/coordinate~Coordinate|Array.|Array.>} + * @type {module:ol/coordinate~Coordinate|Array|Array>} * @private */ this.sketchCoords_ = null; @@ -372,7 +372,7 @@ class Draw extends PointerInteraction { /** * Sketch line coordinates. Used when drawing a polygon or circle. - * @type {Array.} + * @type {Array} * @private */ this.sketchLineCoords_ = null; @@ -580,7 +580,7 @@ class Draw extends PointerInteraction { } last[0] = coordinate[0]; last[1] = coordinate[1]; - this.geometryFunction_(/** @type {!Array.} */ (this.sketchCoords_), geometry); + this.geometryFunction_(/** @type {!Array} */ (this.sketchCoords_), geometry); if (this.sketchPoint_) { const sketchPointGeom = /** @type {module:ol/geom/Point} */ (this.sketchPoint_.getGeometry()); sketchPointGeom.setCoordinates(coordinate); diff --git a/src/ol/interaction/Extent.js b/src/ol/interaction/Extent.js index abbbbd415a..7757a2e315 100644 --- a/src/ol/interaction/Extent.js +++ b/src/ol/interaction/Extent.js @@ -20,12 +20,12 @@ import {createEditingStyle} from '../style/Style.js'; * @typedef {Object} Options * @property {module:ol/extent~Extent} [extent] Initial extent. Defaults to no * initial extent. - * @property {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} [boxStyle] + * @property {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} [boxStyle] * Style for the drawn extent box. Defaults to * {@link module:ol/style/Style~createEditing()['Polygon']} * @property {number} [pixelTolerance=10] Pixel tolerance for considering the * pointer close enough to a segment or vertex for editing. - * @property {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} [pointerStyle] + * @property {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} [pointerStyle] * Style for the cursor used to draw the extent. Defaults to * {@link module:ol/style/Style~createEditing()['Point']} * @property {boolean} [wrapX=false] Wrap the drawn extent across multiple maps diff --git a/src/ol/interaction/Modify.js b/src/ol/interaction/Modify.js index fba132d401..723de5ca24 100644 --- a/src/ol/interaction/Modify.js +++ b/src/ol/interaction/Modify.js @@ -60,12 +60,12 @@ const ModifyEventType = { /** * @typedef {Object} SegmentData - * @property {Array.} [depth] + * @property {Array} [depth] * @property {module:ol/Feature} feature * @property {module:ol/geom/SimpleGeometry} geometry * @property {number} index - * @property {Array.} segment - * @property {Array.} [featureSegments] + * @property {Array} segment + * @property {Array} [featureSegments] */ @@ -87,7 +87,7 @@ const ModifyEventType = { * features. Default is {@link module:ol/events/condition~always}. * @property {number} [pixelTolerance=10] Pixel tolerance for considering the * pointer close enough to a segment or vertex for editing. - * @property {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} [style] + * @property {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} [style] * Style used for the features being modified. By default the default edit * style is used (see {@link module:ol/style}). * @property {module:ol/source/Vector} [source] The vector source with @@ -388,7 +388,7 @@ class Modify extends PointerInteraction { */ removeFeatureSegmentData_(feature) { const rBush = this.rBush_; - const /** @type {Array.} */ nodesToRemove = []; + const /** @type {Array} */ nodesToRemove = []; rBush.forEach( /** * @param {module:ol/interaction/Modify~SegmentData} node RTree node. @@ -948,7 +948,7 @@ class Modify extends PointerInteraction { /** * @param {module:ol/geom/SimpleGeometry} geometry Geometry. * @param {number} index Index. - * @param {Array.|undefined} depth Depth. + * @param {Array|undefined} depth Depth. * @param {number} delta Delta (1 or -1). * @private */ diff --git a/src/ol/interaction/Pointer.js b/src/ol/interaction/Pointer.js index 3f5f6bc201..a3d694dfc7 100644 --- a/src/ol/interaction/Pointer.js +++ b/src/ol/interaction/Pointer.js @@ -136,7 +136,7 @@ class PointerInteraction extends Interaction { this.trackedPointers_ = {}; /** - * @type {Array.} + * @type {Array} * @protected */ this.targetPointers = []; @@ -169,7 +169,7 @@ class PointerInteraction extends Interaction { /** - * @param {Array.} pointerEvents List of events. + * @param {Array} pointerEvents List of events. * @return {module:ol/pixel~Pixel} Centroid pixel. */ export function centroid(pointerEvents) { diff --git a/src/ol/interaction/Select.js b/src/ol/interaction/Select.js index 997075f433..3daa5d7b8c 100644 --- a/src/ol/interaction/Select.js +++ b/src/ol/interaction/Select.js @@ -55,13 +55,13 @@ const SelectEventType = { * feature removes all from the selection. * See `toggle`, `add`, `remove` options for adding/removing extra features to/ * from the selection. - * @property {Array.|function(module:ol/layer/Layer): boolean} [layers] + * @property {Array|function(module:ol/layer/Layer): boolean} [layers] * A list of layers from which features should be selected. Alternatively, a * filter function can be provided. The function will be called for each layer * in the map and should return `true` for layers that you want to be * selectable. If the option is absent, all visible layers will be considered * selectable. - * @property {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} [style] + * @property {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} [style] * Style for the selected features. By default the default edit style is used * (see {@link module:ol/style}). * @property {module:ol/events/condition~Condition} [removeCondition] A function @@ -105,8 +105,8 @@ const SelectEventType = { class SelectEvent extends Event { /** * @param {SelectEventType} type The event type. - * @param {Array.} selected Selected features. - * @param {Array.} deselected Deselected features. + * @param {Array} selected Selected features. + * @param {Array} deselected Deselected features. * @param {module:ol/MapBrowserEvent} mapBrowserEvent Associated * {@link module:ol/MapBrowserEvent}. */ @@ -115,14 +115,14 @@ class SelectEvent extends Event { /** * Selected features array. - * @type {Array.} + * @type {Array} * @api */ this.selected = selected; /** * Deselected features array. - * @type {Array.} + * @type {Array} * @api */ this.deselected = deselected; diff --git a/src/ol/interaction/Snap.js b/src/ol/interaction/Snap.js index abc62c150c..27f76a6e0c 100644 --- a/src/ol/interaction/Snap.js +++ b/src/ol/interaction/Snap.js @@ -29,7 +29,7 @@ import RBush from '../structs/RBush.js'; /** * @typedef {Object} SegmentData * @property {module:ol/Feature} feature - * @property {Array.} segment + * @property {Array} segment */ @@ -105,7 +105,7 @@ class Snap extends PointerInteraction { this.features_ = options.features ? options.features : null; /** - * @type {Array.} + * @type {Array} * @private */ this.featuresListenerKeys_ = []; @@ -224,7 +224,7 @@ class Snap extends PointerInteraction { } /** - * @return {module:ol/Collection.|Array.} Features. + * @return {module:ol/Collection.|Array} Features. * @private */ getFeatures_() { @@ -235,7 +235,7 @@ class Snap extends PointerInteraction { features = this.source_.getFeatures(); } return ( - /** @type {!Array.|!module:ol/Collection.} */ (features) + /** @type {!Array|!module:ol/Collection.} */ (features) ); } diff --git a/src/ol/interaction/Translate.js b/src/ol/interaction/Translate.js index 90989c4302..64468cb0bb 100644 --- a/src/ol/interaction/Translate.js +++ b/src/ol/interaction/Translate.js @@ -40,7 +40,7 @@ const TranslateEventType = { * @typedef {Object} Options * @property {module:ol/Collection.} [features] Only features contained in this collection will be able to be translated. If * not specified, all features on the map will be able to be translated. - * @property {Array.|function(module:ol/layer/Layer): boolean} [layers] A list of layers from which features should be + * @property {Array|function(module:ol/layer/Layer): boolean} [layers] A list of layers from which features should be * translated. Alternatively, a filter function can be provided. The * function will be called for each layer in the map and should return * `true` for layers that you want to be translatable. If the option is diff --git a/src/ol/layer/Base.js b/src/ol/layer/Base.js index 9de3c476c7..78138435dd 100644 --- a/src/ol/layer/Base.js +++ b/src/ol/layer/Base.js @@ -100,17 +100,17 @@ class BaseLayer extends BaseObject { /** * @abstract - * @param {Array.=} opt_array Array of layers (to be + * @param {Array=} opt_array Array of layers (to be * modified in place). - * @return {Array.} Array of layers. + * @return {Array} Array of layers. */ getLayersArray(opt_array) {} /** * @abstract - * @param {Array.=} opt_states Optional list of layer + * @param {Array=} opt_states Optional list of layer * states (to be modified in place). - * @return {Array.} List of layer states. + * @return {Array} List of layer states. */ getLayerStatesArray(opt_states) {} diff --git a/src/ol/layer/Group.js b/src/ol/layer/Group.js index e50f398eba..a2c358d75e 100644 --- a/src/ol/layer/Group.js +++ b/src/ol/layer/Group.js @@ -27,7 +27,7 @@ import SourceState from '../source/State.js'; * visible. * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will * be visible. - * @property {Array.|module:ol/Collection.} [layers] Child layers. + * @property {Array|module:ol/Collection.} [layers] Child layers. */ @@ -64,13 +64,13 @@ class LayerGroup extends BaseLayer { /** * @private - * @type {Array.} + * @type {Array} */ this.layersListenerKeys_ = []; /** * @private - * @type {Object.>} + * @type {Object.>} */ this.listenerKeys_ = {}; diff --git a/src/ol/layer/Heatmap.js b/src/ol/layer/Heatmap.js index 32585fffad..90c0436e84 100644 --- a/src/ol/layer/Heatmap.js +++ b/src/ol/layer/Heatmap.js @@ -24,7 +24,7 @@ import Style from '../style/Style.js'; * visible. * @property {number} [maxResolution] The maximum resolution (exclusive) below which this layer will * be visible. - * @property {Array.} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient + * @property {Array} [gradient=['#00f', '#0ff', '#0f0', '#ff0', '#f00']] The color gradient * of the heatmap, specified as an array of CSS color strings. * @property {number} [radius=8] Radius size in pixels. * @property {number} [blur=15] Blur size in pixels. @@ -54,7 +54,7 @@ const Property = { /** * @const - * @type {Array.} + * @type {Array} */ const DEFAULT_GRADIENT = ['#00f', '#0ff', '#0f0', '#ff0', '#f00']; @@ -105,7 +105,7 @@ class Heatmap extends VectorLayer { /** * @private - * @type {Array.>} + * @type {Array>} */ this.styleCache_ = null; @@ -197,12 +197,12 @@ class Heatmap extends VectorLayer { /** * Return the gradient colors as array of strings. - * @return {Array.} Colors. + * @return {Array} Colors. * @api * @observable */ getGradient() { - return /** @type {Array.} */ (this.get(Property.GRADIENT)); + return /** @type {Array} */ (this.get(Property.GRADIENT)); } /** @@ -263,7 +263,7 @@ class Heatmap extends VectorLayer { /** * Set the gradient colors as array of strings. - * @param {Array.} colors Gradient. + * @param {Array} colors Gradient. * @api * @observable */ @@ -284,7 +284,7 @@ class Heatmap extends VectorLayer { /** - * @param {Array.} colors A list of colored. + * @param {Array} colors A list of colored. * @return {Uint8ClampedArray} An array. */ function createGradient(colors) { diff --git a/src/ol/layer/Vector.js b/src/ol/layer/Vector.js index a54a9fec54..8aa2cbe596 100644 --- a/src/ol/layer/Vector.js +++ b/src/ol/layer/Vector.js @@ -39,7 +39,7 @@ import {createDefaultStyle, toFunction as toStyleFunction} from '../style/Style. * @property {boolean} [declutter=false] Declutter images and text. Decluttering is applied to all * image and text styles, and the priority is defined by the z-index of the style. Lower z-index * means higher priority. - * @property {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} [style] Layer style. See + * @property {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} [style] Layer style. See * {@link module:ol/style} for default style which will be used if this is not defined. * @property {boolean} [updateWhileAnimating=false] When set to `true` and `renderMode` * is `vector`, feature batches will be recreated during animations. This means that no @@ -117,7 +117,7 @@ class VectorLayer extends Layer { /** * User provided style. - * @type {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} + * @type {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} * @private */ this.style_ = null; @@ -194,7 +194,7 @@ class VectorLayer extends Layer { /** * Get the style for features. This returns whatever was passed to the `style` * option at construction or to the `setStyle` method. - * @return {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} + * @return {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} * Layer style. * @api */ @@ -242,7 +242,7 @@ class VectorLayer extends Layer { * it is `null` the layer has no style (a `null` style), so only features * that have their own styles will be rendered in the layer. See * {@link module:ol/style} for information on the default style. - * @param {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction|null|undefined} style Layer style. + * @param {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction|null|undefined} style Layer style. * @api */ setStyle(style) { diff --git a/src/ol/layer/VectorTile.js b/src/ol/layer/VectorTile.js index f393f7da44..17559cbd6f 100644 --- a/src/ol/layer/VectorTile.js +++ b/src/ol/layer/VectorTile.js @@ -68,7 +68,7 @@ export const RenderType = { * image and text styles, and the priority is defined by the z-index of the style. Lower z-index * means higher priority. When set to `true`, a `renderMode` of `'image'` will be overridden with * `'hybrid'`. - * @property {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} [style] Layer style. See + * @property {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} [style] Layer style. See * {@link module:ol/style} for default style which will be used if this is not defined. * @property {boolean} [updateWhileAnimating=false] When set to `true`, feature batches will be * recreated during animations. This means that no vectors will be shown clipped, but the setting @@ -80,7 +80,7 @@ export const RenderType = { * means no preloading. * @property {module:ol/render~OrderFunction} [renderOrder] Render order. Function to be used when sorting * features before rendering. By default features are drawn in the order that they are created. - * @property {module:ol/style/Style|Array.|module:ol/style/Style~StyleFunction} [style] Layer style. See + * @property {module:ol/style/Style|Array|module:ol/style/Style~StyleFunction} [style] Layer style. See * {@link module:ol/style} for default style which will be used if this is not defined. * @property {boolean} [useInterimTilesOnError=true] Use interim tiles on error. */ diff --git a/src/ol/loadingstrategy.js b/src/ol/loadingstrategy.js index 40fcc9e57c..13790011ac 100644 --- a/src/ol/loadingstrategy.js +++ b/src/ol/loadingstrategy.js @@ -7,7 +7,7 @@ * Strategy function for loading all features with a single request. * @param {module:ol/extent~Extent} extent Extent. * @param {number} resolution Resolution. - * @return {Array.} Extents. + * @return {Array} Extents. * @api */ export function all(extent, resolution) { @@ -20,7 +20,7 @@ export function all(extent, resolution) { * resolution. * @param {module:ol/extent~Extent} extent Extent. * @param {number} resolution Resolution. - * @return {Array.} Extents. + * @return {Array} Extents. * @api */ export function bbox(extent, resolution) { @@ -31,7 +31,7 @@ export function bbox(extent, resolution) { /** * Creates a strategy function for loading features based on a tile grid. * @param {module:ol/tilegrid/TileGrid} tileGrid Tile grid. - * @return {function(module:ol/extent~Extent, number): Array.} Loading strategy. + * @return {function(module:ol/extent~Extent, number): Array} Loading strategy. * @api */ export function tile(tileGrid) { @@ -39,12 +39,12 @@ export function tile(tileGrid) { /** * @param {module:ol/extent~Extent} extent Extent. * @param {number} resolution Resolution. - * @return {Array.} Extents. + * @return {Array} Extents. */ function(extent, resolution) { const z = tileGrid.getZForResolution(resolution); const tileRange = tileGrid.getTileRangeForExtentAndZ(extent, z); - /** @type {Array.} */ + /** @type {Array} */ const extents = []; /** @type {module:ol/tilecoord~TileCoord} */ const tileCoord = [z, 0, 0]; diff --git a/src/ol/math.js b/src/ol/math.js index 7071d4566b..236e951f33 100644 --- a/src/ol/math.js +++ b/src/ol/math.js @@ -99,9 +99,9 @@ export function squaredDistance(x1, y1, x2, y2) { /** * Solves system of linear equations using Gaussian elimination method. * - * @param {Array.>} mat Augmented matrix (n x n + 1 column) + * @param {Array>} mat Augmented matrix (n x n + 1 column) * in row-major order. - * @return {Array.} The resulting vector. + * @return {Array} The resulting vector. */ export function solveLinearSystem(mat) { const n = mat.length; diff --git a/src/ol/pixel.js b/src/ol/pixel.js index 08ebae63fd..30d0b512ec 100644 --- a/src/ol/pixel.js +++ b/src/ol/pixel.js @@ -1,6 +1,6 @@ /** * An array with two elements, representing a pixel. The first element is the * x-coordinate, the second the y-coordinate of the pixel. - * @typedef {Array.} Pixel + * @typedef {Array} Pixel * @api */ diff --git a/src/ol/pointer/EventSource.js b/src/ol/pointer/EventSource.js index 6f3971506b..e5af64a733 100644 --- a/src/ol/pointer/EventSource.js +++ b/src/ol/pointer/EventSource.js @@ -25,7 +25,7 @@ class EventSource { /** * List of events supported by this source. - * @return {Array.} Event names + * @return {Array} Event names */ getEvents() { return Object.keys(this.mapping_); diff --git a/src/ol/pointer/MouseSource.js b/src/ol/pointer/MouseSource.js index 023252358c..0fad374de8 100644 --- a/src/ol/pointer/MouseSource.js +++ b/src/ol/pointer/MouseSource.js @@ -154,7 +154,7 @@ class MouseSource extends EventSource { /** * @const - * @type {Array.} + * @type {Array} */ this.lastTouches = []; } diff --git a/src/ol/pointer/MsSource.js b/src/ol/pointer/MsSource.js index 17e174c0c6..8987a737fe 100644 --- a/src/ol/pointer/MsSource.js +++ b/src/ol/pointer/MsSource.js @@ -36,7 +36,7 @@ import EventSource from '../pointer/EventSource.js'; /** * @const - * @type {Array.} + * @type {Array} */ const POINTER_TYPES = [ '', diff --git a/src/ol/pointer/PointerEventHandler.js b/src/ol/pointer/PointerEventHandler.js index a7a350129d..69c0d1afa4 100644 --- a/src/ol/pointer/PointerEventHandler.js +++ b/src/ol/pointer/PointerEventHandler.js @@ -45,7 +45,7 @@ import TouchSource from '../pointer/TouchSource.js'; /** * Properties to copy when cloning an event, with default values. - * @type {Array.} + * @type {Array} */ const CLONE_PROPS = [ // MouseEvent @@ -111,7 +111,7 @@ class PointerEventHandler extends EventTarget { this.eventMap_ = {}; /** - * @type {Array.} + * @type {Array} * @private */ this.eventSourceList_ = []; @@ -203,7 +203,7 @@ class PointerEventHandler extends EventTarget { /** * Setup listeners for the given events. * @private - * @param {Array.} events List of events. + * @param {Array} events List of events. */ addEvents_(events) { events.forEach(function(eventName) { @@ -214,7 +214,7 @@ class PointerEventHandler extends EventTarget { /** * Unregister listeners for the given events. * @private - * @param {Array.} events List of events. + * @param {Array} events List of events. */ removeEvents_(events) { events.forEach(function(e) { diff --git a/src/ol/proj.js b/src/ol/proj.js index c243a434e9..d25e7f7d38 100644 --- a/src/ol/proj.js +++ b/src/ol/proj.js @@ -78,7 +78,7 @@ import {add as addTransformFunc, clear as clearTransformFuncs, get as getTransfo * transforms the input coordinate values, populates the output array, and * returns the output array. * - * @typedef {function(Array., Array.=, number=): Array.} TransformFunction + * @typedef {function(Array, Array=, number=): Array} TransformFunction * @api */ @@ -87,10 +87,10 @@ export {METERS_PER_UNIT}; /** - * @param {Array.} input Input coordinate array. - * @param {Array.=} opt_output Output array of coordinate values. + * @param {Array} input Input coordinate array. + * @param {Array=} opt_output Output array of coordinate values. * @param {number=} opt_dimension Dimension. - * @return {Array.} Output coordinate array (new array, same coordinate + * @return {Array} Output coordinate array (new array, same coordinate * values). */ export function cloneTransform(input, opt_output, opt_dimension) { @@ -108,10 +108,10 @@ export function cloneTransform(input, opt_output, opt_dimension) { /** - * @param {Array.} input Input coordinate array. - * @param {Array.=} opt_output Output array of coordinate values. + * @param {Array} input Input coordinate array. + * @param {Array=} opt_output Output array of coordinate values. * @param {number=} opt_dimension Dimension. - * @return {Array.} Input coordinate array (same array as input). + * @return {Array} Input coordinate array (same array as input). */ export function identityTransform(input, opt_output, opt_dimension) { if (opt_output !== undefined && input !== opt_output) { @@ -138,7 +138,7 @@ export function addProjection(projection) { /** - * @param {Array.} projections Projections. + * @param {Array} projections Projections. */ export function addProjections(projections) { projections.forEach(addProjection); @@ -227,7 +227,7 @@ export function getPointResolution(projection, resolution, point, opt_units) { * Registers transformation functions that don't alter coordinates. Those allow * to transform between projections with equal meaning. * - * @param {Array.} projections Projections. + * @param {Array} projections Projections. * @api */ export function addEquivalentProjections(projections) { @@ -246,9 +246,9 @@ export function addEquivalentProjections(projections) { * Registers transformation functions to convert coordinates in any projection * in projection1 to any projection in projection2. * - * @param {Array.} projections1 Projections with equal + * @param {Array} projections1 Projections with equal * meaning. - * @param {Array.} projections2 Projections with equal + * @param {Array} projections2 Projections with equal * meaning. * @param {module:ol/proj~TransformFunction} forwardTransform Transformation from any * projection in projection1 to any projection in projection2. @@ -302,10 +302,10 @@ export function createProjection(projection, defaultCode) { export function createTransformFromCoordinateTransform(coordTransform) { return ( /** - * @param {Array.} input Input. - * @param {Array.=} opt_output Output. + * @param {Array} input Input. + * @param {Array=} opt_output Output. * @param {number=} opt_dimension Dimension. - * @return {Array.} Output. + * @return {Array} Output. */ function(input, opt_output, opt_dimension) { const length = input.length; diff --git a/src/ol/proj/epsg3857.js b/src/ol/proj/epsg3857.js index 9cd1c1684a..7b93ba71b6 100644 --- a/src/ol/proj/epsg3857.js +++ b/src/ol/proj/epsg3857.js @@ -69,7 +69,7 @@ class EPSG3857Projection extends Projection { * Projections equal to EPSG:3857. * * @const - * @type {Array.} + * @type {Array} */ export const PROJECTIONS = [ new EPSG3857Projection('EPSG:3857'), @@ -85,10 +85,10 @@ export const PROJECTIONS = [ /** * Transformation from EPSG:4326 to EPSG:3857. * - * @param {Array.} input Input array of coordinate values. - * @param {Array.=} opt_output Output array of coordinate values. + * @param {Array} input Input array of coordinate values. + * @param {Array=} opt_output Output array of coordinate values. * @param {number=} opt_dimension Dimension (default is `2`). - * @return {Array.} Output array of coordinate values. + * @return {Array} Output array of coordinate values. */ export function fromEPSG4326(input, opt_output, opt_dimension) { const length = input.length; @@ -121,10 +121,10 @@ export function fromEPSG4326(input, opt_output, opt_dimension) { /** * Transformation from EPSG:3857 to EPSG:4326. * - * @param {Array.} input Input array of coordinate values. - * @param {Array.=} opt_output Output array of coordinate values. + * @param {Array} input Input array of coordinate values. + * @param {Array=} opt_output Output array of coordinate values. * @param {number=} opt_dimension Dimension (default is `2`). - * @return {Array.} Output array of coordinate values. + * @return {Array} Output array of coordinate values. */ export function toEPSG4326(input, opt_output, opt_dimension) { const length = input.length; diff --git a/src/ol/proj/epsg4326.js b/src/ol/proj/epsg4326.js index 7001b8eab5..df983c7182 100644 --- a/src/ol/proj/epsg4326.js +++ b/src/ol/proj/epsg4326.js @@ -64,7 +64,7 @@ class EPSG4326Projection extends Projection { * Projections equal to EPSG:4326. * * @const - * @type {Array.} + * @type {Array} */ export const PROJECTIONS = [ new EPSG4326Projection('CRS:84'), diff --git a/src/ol/render/Feature.js b/src/ol/render/Feature.js index 447d684658..78168d8470 100644 --- a/src/ol/render/Feature.js +++ b/src/ol/render/Feature.js @@ -25,9 +25,9 @@ const tmpTransform = createTransform(); * through the API is limited to getting the type and extent of the geometry. * * @param {module:ol/geom/GeometryType} type Geometry type. - * @param {Array.} flatCoordinates Flat coordinates. These always need + * @param {Array} flatCoordinates Flat coordinates. These always need * to be right-handed for polygons. - * @param {Array.|Array.>} ends Ends or Endss. + * @param {Array|Array>} ends Ends or Endss. * @param {Object.} properties Properties. * @param {number|string|undefined} id Feature id. */ @@ -53,25 +53,25 @@ class RenderFeature { /** * @private - * @type {Array.} + * @type {Array} */ this.flatCoordinates_ = flatCoordinates; /** * @private - * @type {Array.} + * @type {Array} */ this.flatInteriorPoints_ = null; /** * @private - * @type {Array.} + * @type {Array} */ this.flatMidpoints_ = null; /** * @private - * @type {Array.|Array.>} + * @type {Array|Array>} */ this.ends_ = ends; @@ -110,7 +110,7 @@ class RenderFeature { } /** - * @return {Array.} Flat interior points. + * @return {Array} Flat interior points. */ getFlatInteriorPoint() { if (!this.flatInteriorPoints_) { @@ -122,7 +122,7 @@ class RenderFeature { } /** - * @return {Array.} Flat interior points. + * @return {Array} Flat interior points. */ getFlatInteriorPoints() { if (!this.flatInteriorPoints_) { @@ -135,7 +135,7 @@ class RenderFeature { } /** - * @return {Array.} Flat midpoint. + * @return {Array} Flat midpoint. */ getFlatMidpoint() { if (!this.flatMidpoints_) { @@ -146,7 +146,7 @@ class RenderFeature { } /** - * @return {Array.} Flat midpoints. + * @return {Array} Flat midpoints. */ getFlatMidpoints() { if (!this.flatMidpoints_) { @@ -176,7 +176,7 @@ class RenderFeature { } /** - * @return {Array.} Flat coordinates. + * @return {Array} Flat coordinates. */ getOrientedFlatCoordinates() { return this.flatCoordinates_; @@ -240,7 +240,7 @@ class RenderFeature { /** - * @return {Array.|Array.>} Ends or endss. + * @return {Array|Array>} Ends or endss. */ RenderFeature.prototype.getEnds = RenderFeature.prototype.getEndss = function() { @@ -249,7 +249,7 @@ RenderFeature.prototype.getEndss = function() { /** - * @return {Array.} Flat coordinates. + * @return {Array} Flat coordinates. */ RenderFeature.prototype.getFlatCoordinates = RenderFeature.prototype.getOrientedFlatCoordinates; diff --git a/src/ol/render/canvas.js b/src/ol/render/canvas.js index e769547c6e..6cc9a40aed 100644 --- a/src/ol/render/canvas.js +++ b/src/ol/render/canvas.js @@ -19,7 +19,7 @@ import {create as createTransform} from '../transform.js'; * @property {module:ol/colorlike~ColorLike} [currentFillStyle] * @property {module:ol/colorlike~ColorLike} [currentStrokeStyle] * @property {string} [currentLineCap] - * @property {Array.} currentLineDash + * @property {Array} currentLineDash * @property {number} [currentLineDashOffset] * @property {string} [currentLineJoin] * @property {number} [currentLineWidth] @@ -28,7 +28,7 @@ import {create as createTransform} from '../transform.js'; * @property {module:ol/colorlike~ColorLike} [fillStyle] * @property {module:ol/colorlike~ColorLike} [strokeStyle] * @property {string} [lineCap] - * @property {Array.} lineDash + * @property {Array} lineDash * @property {number} [lineDashOffset] * @property {string} [lineJoin] * @property {number} [lineWidth] @@ -39,7 +39,7 @@ import {create as createTransform} from '../transform.js'; /** * @typedef {Object} StrokeState * @property {string} lineCap - * @property {Array.} lineDash + * @property {Array} lineDash * @property {number} lineDashOffset * @property {string} lineJoin * @property {number} lineWidth @@ -65,7 +65,7 @@ import {create as createTransform} from '../transform.js'; * in the group, i.e. 2 when an image and a text are grouped, or 1 otherwise. * In addition to these four elements, declutter instruction arrays (i.e. the * arguments to {@link module:ol/render/canvas~drawImage} are appended to the array. - * @typedef {Array.<*>} DeclutterGroup + * @typedef {Array<*>} DeclutterGroup */ @@ -92,7 +92,7 @@ export const defaultLineCap = 'round'; /** * @const - * @type {Array.} + * @type {Array} */ export const defaultLineDash = []; @@ -141,7 +141,7 @@ export const defaultTextBaseline = 'middle'; /** * @const - * @type {Array.} + * @type {Array} */ export const defaultPadding = [0, 0, 0, 0]; diff --git a/src/ol/render/canvas/ImageReplay.js b/src/ol/render/canvas/ImageReplay.js index 7d013d3b41..4442109e2b 100644 --- a/src/ol/render/canvas/ImageReplay.js +++ b/src/ol/render/canvas/ImageReplay.js @@ -103,7 +103,7 @@ class CanvasImageReplay extends CanvasReplay { } /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. diff --git a/src/ol/render/canvas/Immediate.js b/src/ol/render/canvas/Immediate.js index fc00a3eec0..8896e9320a 100644 --- a/src/ol/render/canvas/Immediate.js +++ b/src/ol/render/canvas/Immediate.js @@ -224,7 +224,7 @@ class CanvasImmediateRenderer extends VectorContext { /** * @private - * @type {Array.} + * @type {Array} */ this.pixelCoordinates_ = []; @@ -237,7 +237,7 @@ class CanvasImmediateRenderer extends VectorContext { } /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -290,7 +290,7 @@ class CanvasImmediateRenderer extends VectorContext { } /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -339,7 +339,7 @@ class CanvasImmediateRenderer extends VectorContext { } /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -367,9 +367,9 @@ class CanvasImmediateRenderer extends VectorContext { } /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @private * @return {number} End. diff --git a/src/ol/render/canvas/Instruction.js b/src/ol/render/canvas/Instruction.js index cccca58d61..c517fb7ea4 100644 --- a/src/ol/render/canvas/Instruction.js +++ b/src/ol/render/canvas/Instruction.js @@ -23,25 +23,25 @@ const Instruction = { /** - * @type {Array.} + * @type {Array} */ export const fillInstruction = [Instruction.FILL]; /** - * @type {Array.} + * @type {Array} */ export const strokeInstruction = [Instruction.STROKE]; /** - * @type {Array.} + * @type {Array} */ export const beginPathInstruction = [Instruction.BEGIN_PATH]; /** - * @type {Array.} + * @type {Array} */ export const closePathInstruction = [Instruction.CLOSE_PATH]; diff --git a/src/ol/render/canvas/LineStringReplay.js b/src/ol/render/canvas/LineStringReplay.js index 66c8406f3e..8b2d7eb189 100644 --- a/src/ol/render/canvas/LineStringReplay.js +++ b/src/ol/render/canvas/LineStringReplay.js @@ -18,7 +18,7 @@ class CanvasLineStringReplay extends CanvasReplay { } /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. diff --git a/src/ol/render/canvas/PolygonReplay.js b/src/ol/render/canvas/PolygonReplay.js index 6c0d898055..12f0ffaf4f 100644 --- a/src/ol/render/canvas/PolygonReplay.js +++ b/src/ol/render/canvas/PolygonReplay.js @@ -24,9 +24,9 @@ class CanvasPolygonReplay extends CanvasReplay { } /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. * @private * @return {number} End. diff --git a/src/ol/render/canvas/Replay.js b/src/ol/render/canvas/Replay.js index 63ade6351b..d7c29ac623 100644 --- a/src/ol/render/canvas/Replay.js +++ b/src/ol/render/canvas/Replay.js @@ -104,13 +104,13 @@ class CanvasReplay extends VectorContext { /** * @private - * @type {Array.<*>} + * @type {Array<*>} */ this.beginGeometryInstruction1_ = null; /** * @private - * @type {Array.<*>} + * @type {Array<*>} */ this.beginGeometryInstruction2_ = null; @@ -122,19 +122,19 @@ class CanvasReplay extends VectorContext { /** * @protected - * @type {Array.<*>} + * @type {Array<*>} */ this.instructions = []; /** * @protected - * @type {Array.} + * @type {Array} */ this.coordinates = []; /** * @private - * @type {!Object.|Array.>>} + * @type {!Object.|Array>>} */ this.coordinateCache_ = {}; @@ -146,13 +146,13 @@ class CanvasReplay extends VectorContext { /** * @protected - * @type {Array.<*>} + * @type {Array<*>} */ this.hitDetectionInstructions = []; /** * @private - * @type {Array.} + * @type {Array} */ this.pixelCoordinates_ = null; @@ -176,8 +176,8 @@ class CanvasReplay extends VectorContext { * @param {module:ol/coordinate~Coordinate} p2 2nd point of the background box. * @param {module:ol/coordinate~Coordinate} p3 3rd point of the background box. * @param {module:ol/coordinate~Coordinate} p4 4th point of the background box. - * @param {Array.<*>} fillInstruction Fill instruction. - * @param {Array.<*>} strokeInstruction Stroke instruction. + * @param {Array<*>} fillInstruction Fill instruction. + * @param {Array<*>} strokeInstruction Stroke instruction. */ replayTextBackground_(context, p1, p2, p3, p4, fillInstruction, strokeInstruction) { context.beginPath(); @@ -191,7 +191,7 @@ class CanvasReplay extends VectorContext { this.fill_(context); } if (strokeInstruction) { - this.setStrokeStyle_(context, /** @type {Array.<*>} */ (strokeInstruction)); + this.setStrokeStyle_(context, /** @type {Array<*>} */ (strokeInstruction)); context.stroke(); } } @@ -212,9 +212,9 @@ class CanvasReplay extends VectorContext { * @param {number} scale Scale. * @param {boolean} snapToPixel Snap to pixel. * @param {number} width Width. - * @param {Array.} padding Padding. - * @param {Array.<*>} fillInstruction Fill instruction. - * @param {Array.<*>} strokeInstruction Stroke instruction. + * @param {Array} padding Padding. + * @param {Array<*>} fillInstruction Fill instruction. + * @param {Array<*>} strokeInstruction Stroke instruction. */ replayImage_( context, @@ -304,8 +304,8 @@ class CanvasReplay extends VectorContext { } else if (intersects) { if (fillStroke) { this.replayTextBackground_(context, p1, p2, p3, p4, - /** @type {Array.<*>} */ (fillInstruction), - /** @type {Array.<*>} */ (strokeInstruction)); + /** @type {Array<*>} */ (fillInstruction), + /** @type {Array<*>} */ (strokeInstruction)); } drawImage(context, transform, opacity, image, originX, originY, w, h, x, y, scale); } @@ -313,8 +313,8 @@ class CanvasReplay extends VectorContext { /** * @protected - * @param {Array.} dashArray Dash array. - * @return {Array.} Dash array with pixel ratio applied + * @param {Array} dashArray Dash array. + * @return {Array} Dash array with pixel ratio applied */ applyPixelRatio(dashArray) { const pixelRatio = this.pixelRatio; @@ -324,7 +324,7 @@ class CanvasReplay extends VectorContext { } /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -378,11 +378,11 @@ class CanvasReplay extends VectorContext { } /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. - * @param {Array.} ends Ends. + * @param {Array} ends Ends. * @param {number} stride Stride. - * @param {Array.} replayEnds Replay ends. + * @param {Array} replayEnds Replay ends. * @return {number} Offset. */ drawCustomCoordinates_(flatCoordinates, offset, ends, stride, replayEnds) { @@ -476,7 +476,7 @@ class CanvasReplay extends VectorContext { /** * @private * @param {CanvasRenderingContext2D} context Context. - * @param {Array.<*>} instruction Instruction. + * @param {Array<*>} instruction Instruction. */ setStrokeStyle_(context, instruction) { context.strokeStyle = /** @type {module:ol/colorlike~ColorLike} */ (instruction[1]); @@ -486,7 +486,7 @@ class CanvasReplay extends VectorContext { context.miterLimit = /** @type {number} */ (instruction[5]); if (CANVAS_LINE_DASH) { context.lineDashOffset = /** @type {number} */ (instruction[7]); - context.setLineDash(/** @type {Array.} */ (instruction[6])); + context.setLineDash(/** @type {Array} */ (instruction[6])); } } @@ -532,7 +532,7 @@ class CanvasReplay extends VectorContext { * @param {module:ol/transform~Transform} transform Transform. * @param {Object.} skippedFeaturesHash Ids of features * to skip. - * @param {Array.<*>} instructions Instructions array. + * @param {Array<*>} instructions Instructions array. * @param {function((module:ol/Feature|module:ol/render/Feature)): T|undefined} featureCallback Feature callback. * @param {module:ol/extent~Extent=} opt_hitExtent Only check features that intersect this * extent. @@ -547,7 +547,7 @@ class CanvasReplay extends VectorContext { featureCallback, opt_hitExtent ) { - /** @type {Array.} */ + /** @type {Array} */ let pixelCoordinates; if (this.pixelCoordinates_ && equals(transform, this.renderedTransform_)) { pixelCoordinates = this.pixelCoordinates_; @@ -677,7 +677,7 @@ class CanvasReplay extends VectorContext { let padding, backgroundFill, backgroundStroke; if (instruction.length > 16) { - padding = /** @type {Array.} */ (instruction[16]); + padding = /** @type {Array} */ (instruction[16]); backgroundFill = /** @type {boolean} */ (instruction[17]); backgroundStroke = /** @type {boolean} */ (instruction[18]); } else { @@ -693,8 +693,8 @@ class CanvasReplay extends VectorContext { pixelCoordinates[d], pixelCoordinates[d + 1], image, anchorX, anchorY, declutterGroup, height, opacity, originX, originY, rotation, scale, snapToPixel, width, padding, - backgroundFill ? /** @type {Array.<*>} */ (lastFillInstruction) : null, - backgroundStroke ? /** @type {Array.<*>} */ (lastStrokeInstruction) : null); + backgroundFill ? /** @type {Array<*>} */ (lastFillInstruction) : null, + backgroundStroke ? /** @type {Array<*>} */ (lastStrokeInstruction) : null); } this.renderDeclutter_(declutterGroup, feature); ++i; @@ -822,7 +822,7 @@ class CanvasReplay extends VectorContext { context.stroke(); pendingStroke = 0; } - this.setStrokeStyle_(context, /** @type {Array.<*>} */ (instruction)); + this.setStrokeStyle_(context, /** @type {Array<*>} */ (instruction)); ++i; break; case CanvasInstruction.STROKE: @@ -966,7 +966,7 @@ class CanvasReplay extends VectorContext { /** * @param {module:ol/render/canvas~FillStrokeState} state State. * @param {module:ol/geom/Geometry|module:ol/render/Feature} geometry Geometry. - * @return {Array.<*>} Fill instruction. + * @return {Array<*>} Fill instruction. */ createFill(state, geometry) { const fillStyle = state.fillStyle; @@ -987,7 +987,7 @@ class CanvasReplay extends VectorContext { /** * @param {module:ol/render/canvas~FillStrokeState} state State. - * @return {Array.<*>} Stroke instruction. + * @return {Array<*>} Stroke instruction. */ createStroke(state) { return [ @@ -1000,7 +1000,7 @@ class CanvasReplay extends VectorContext { /** * @param {module:ol/render/canvas~FillStrokeState} state State. - * @param {function(this:module:ol/render/canvas/Replay, module:ol/render/canvas~FillStrokeState, (module:ol/geom/Geometry|module:ol/render/Feature)):Array.<*>} createFill Create fill. + * @param {function(this:module:ol/render/canvas/Replay, module:ol/render/canvas~FillStrokeState, (module:ol/geom/Geometry|module:ol/render/Feature)):Array<*>} createFill Create fill. * @param {module:ol/geom/Geometry|module:ol/render/Feature} geometry Geometry. */ updateFillStyle(state, createFill, geometry) { diff --git a/src/ol/render/canvas/ReplayGroup.js b/src/ol/render/canvas/ReplayGroup.js index 731f114b95..de3fa4e9c3 100644 --- a/src/ol/render/canvas/ReplayGroup.js +++ b/src/ol/render/canvas/ReplayGroup.js @@ -21,7 +21,7 @@ import {create as createTransform, compose as composeTransform} from '../../tran /** * @type {Object.)>} + * number, number, boolean, Array)>} */ const BATCH_CONSTRUCTORS = { 'Circle': CanvasPolygonReplay, @@ -154,7 +154,7 @@ class CanvasReplayGroup extends ReplayGroup { } /** - * @param {Array.} replays Replays. + * @param {Array} replays Replays. * @return {boolean} Has replays of the provided types. */ hasReplays(replays) { @@ -265,7 +265,7 @@ class CanvasReplayGroup extends ReplayGroup { } } - /** @type {Array.} */ + /** @type {Array} */ const zs = Object.keys(this.replaysByZIndex_).map(Number); zs.sort(numberSafeCompareFunction); @@ -300,7 +300,7 @@ class CanvasReplayGroup extends ReplayGroup { /** * @param {module:ol/transform~Transform} transform Transform. - * @return {Array.} Clip coordinates. + * @return {Array} Clip coordinates. */ getClipCoords(transform) { const maxExtent = this.maxExtent_; @@ -353,7 +353,7 @@ class CanvasReplayGroup extends ReplayGroup { * @param {module:ol/transform~Transform} transform Transform. * @param {number} viewRotation View rotation. * @param {Object.} skippedFeaturesHash Ids of features to skip. - * @param {Array.=} opt_replayTypes Ordered replay types to replay. + * @param {Array=} opt_replayTypes Ordered replay types to replay. * Default is {@link module:ol/render/replay~ORDER} * @param {Object.=} opt_declutterReplays Declutter replays. */ @@ -366,7 +366,7 @@ class CanvasReplayGroup extends ReplayGroup { opt_declutterReplays ) { - /** @type {Array.} */ + /** @type {Array} */ const zs = Object.keys(this.replaysByZIndex_).map(Number); zs.sort(numberSafeCompareFunction); @@ -407,7 +407,7 @@ class CanvasReplayGroup extends ReplayGroup { /** * This cache is used for storing calculated pixel circles for increasing performance. * It is a static property to allow each Replaygroup to access it. - * @type {Object.>>} + * @type {Object.>>} */ const circleArrayCache = { 0: [[true]] @@ -417,7 +417,7 @@ const circleArrayCache = { /** * This method fills a row in the array from the given coordinate to the * middle with `true`. - * @param {Array.>} array The array that will be altered. + * @param {Array>} array The array that will be altered. * @param {number} x X coordinate. * @param {number} y Y coordinate. */ @@ -442,7 +442,7 @@ function fillCircleArrayRowToMiddle(array, x, y) { * It uses the midpoint circle algorithm. * A cache is used to increase performance. * @param {number} radius Radius. - * @returns {Array.>} An array with marked circle points. + * @returns {Array>} An array with marked circle points. */ export function getCircleArray(radius) { if (circleArrayCache[radius] !== undefined) { @@ -483,7 +483,7 @@ export function getCircleArray(radius) { /** - * @param {!Object.>} declutterReplays Declutter replays. + * @param {!Object.>} declutterReplays Declutter replays. * @param {CanvasRenderingContext2D} context Context. * @param {number} rotation Rotation. */ diff --git a/src/ol/render/canvas/TextReplay.js b/src/ol/render/canvas/TextReplay.js index 36b1e3793e..31ebb46a5d 100644 --- a/src/ol/render/canvas/TextReplay.js +++ b/src/ol/render/canvas/TextReplay.js @@ -34,7 +34,7 @@ class CanvasTextReplay extends CanvasReplay { /** * @private - * @type {Array.} + * @type {Array} */ this.labels_ = null; @@ -520,8 +520,8 @@ class CanvasTextReplay extends CanvasReplay { /** * @param {string} font Font to use for measuring. - * @param {Array.} lines Lines to measure. - * @param {Array.} widths Array will be populated with the widths of + * @param {Array} lines Lines to measure. + * @param {Array} widths Array will be populated with the widths of * each line. * @return {number} Width of the whole text. */ diff --git a/src/ol/render/replay.js b/src/ol/render/replay.js index b624f84dc0..9f7f535806 100644 --- a/src/ol/render/replay.js +++ b/src/ol/render/replay.js @@ -6,7 +6,7 @@ import ReplayType from '../render/ReplayType.js'; /** * @const - * @type {Array.} + * @type {Array} */ export const ORDER = [ ReplayType.POLYGON, diff --git a/src/ol/render/webgl.js b/src/ol/render/webgl.js index b1d0079f96..4eccf201bc 100644 --- a/src/ol/render/webgl.js +++ b/src/ol/render/webgl.js @@ -26,7 +26,7 @@ export const DEFAULT_LINECAP = 'round'; /** * @const - * @type {Array.} + * @type {Array} */ export const DEFAULT_LINEDASH = []; diff --git a/src/ol/render/webgl/CircleReplay.js b/src/ol/render/webgl/CircleReplay.js index eecd9d46aa..ea81dcc5d1 100644 --- a/src/ol/render/webgl/CircleReplay.js +++ b/src/ol/render/webgl/CircleReplay.js @@ -31,13 +31,13 @@ class WebGLCircleReplay extends WebGLReplay { /** * @private - * @type {Array.|number>>} + * @type {Array|number>>} */ this.styles_ = []; /** * @private - * @type {Array.} + * @type {Array} */ this.styleIndices_ = []; @@ -49,9 +49,9 @@ class WebGLCircleReplay extends WebGLReplay { /** * @private - * @type {{fillColor: (Array.|null), - * strokeColor: (Array.|null), - * lineDash: Array., + * @type {{fillColor: (Array|null), + * strokeColor: (Array|null), + * lineDash: Array, * lineDashOffset: (number|undefined), * lineWidth: (number|undefined), * changed: boolean}|null} @@ -69,7 +69,7 @@ class WebGLCircleReplay extends WebGLReplay { /** * @private - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -136,8 +136,8 @@ class WebGLCircleReplay extends WebGLReplay { this.styles_.pop(); if (this.styles_.length) { const lastState = this.styles_[this.styles_.length - 1]; - this.state_.fillColor = /** @type {Array.} */ (lastState[0]); - this.state_.strokeColor = /** @type {Array.} */ (lastState[1]); + this.state_.fillColor = /** @type {Array} */ (lastState[0]); + this.state_.strokeColor = /** @type {Array} */ (lastState[1]); this.state_.lineWidth = /** @type {number} */ (lastState[2]); this.state_.changed = false; } @@ -242,8 +242,8 @@ class WebGLCircleReplay extends WebGLReplay { for (i = this.styleIndices_.length - 1; i >= 0; --i) { start = this.styleIndices_[i]; nextStyle = this.styles_[i]; - this.setFillStyle_(gl, /** @type {Array.} */ (nextStyle[0])); - this.setStrokeStyle_(gl, /** @type {Array.} */ (nextStyle[1]), + this.setFillStyle_(gl, /** @type {Array} */ (nextStyle[0])); + this.setStrokeStyle_(gl, /** @type {Array} */ (nextStyle[1]), /** @type {number} */ (nextStyle[2])); this.drawElements(gl, context, start, end); end = start; @@ -260,8 +260,8 @@ class WebGLCircleReplay extends WebGLReplay { end = this.startIndices[featureIndex + 1]; for (i = this.styleIndices_.length - 1; i >= 0; --i) { nextStyle = this.styles_[i]; - this.setFillStyle_(gl, /** @type {Array.} */ (nextStyle[0])); - this.setStrokeStyle_(gl, /** @type {Array.} */ (nextStyle[1]), + this.setFillStyle_(gl, /** @type {Array} */ (nextStyle[0])); + this.setStrokeStyle_(gl, /** @type {Array} */ (nextStyle[1]), /** @type {number} */ (nextStyle[2])); groupStart = this.styleIndices_[i]; @@ -305,8 +305,8 @@ class WebGLCircleReplay extends WebGLReplay { end = start = this.startIndices[featureIndex + 1]; for (i = this.styleIndices_.length - 1; i >= 0; --i) { nextStyle = this.styles_[i]; - this.setFillStyle_(gl, /** @type {Array.} */ (nextStyle[0])); - this.setStrokeStyle_(gl, /** @type {Array.} */ (nextStyle[1]), + this.setFillStyle_(gl, /** @type {Array} */ (nextStyle[0])); + this.setStrokeStyle_(gl, /** @type {Array} */ (nextStyle[1]), /** @type {number} */ (nextStyle[2])); groupStart = this.styleIndices_[i]; @@ -335,7 +335,7 @@ class WebGLCircleReplay extends WebGLReplay { /** * @private * @param {WebGLRenderingContext} gl gl. - * @param {Array.} color Color. + * @param {Array} color Color. */ setFillStyle_(gl, color) { gl.uniform4fv(this.defaultLocations_.u_fillColor, color); @@ -344,7 +344,7 @@ class WebGLCircleReplay extends WebGLReplay { /** * @private * @param {WebGLRenderingContext} gl gl. - * @param {Array.} color Color. + * @param {Array} color Color. * @param {number} lineWidth Line width. */ setStrokeStyle_(gl, color, lineWidth) { diff --git a/src/ol/render/webgl/ImageReplay.js b/src/ol/render/webgl/ImageReplay.js index b1b22edfba..f4641e4f76 100644 --- a/src/ol/render/webgl/ImageReplay.js +++ b/src/ol/render/webgl/ImageReplay.js @@ -14,25 +14,25 @@ class WebGLImageReplay extends WebGLTextureReplay { super(tolerance, maxExtent); /** - * @type {Array.} + * @type {Array} * @protected */ this.images_ = []; /** - * @type {Array.} + * @type {Array} * @protected */ this.hitDetectionImages_ = []; /** - * @type {Array.} + * @type {Array} * @private */ this.textures_ = []; /** - * @type {Array.} + * @type {Array} * @private */ this.hitDetectionTextures_ = []; diff --git a/src/ol/render/webgl/LineStringReplay.js b/src/ol/render/webgl/LineStringReplay.js index 4851b5a7db..f4784c4aff 100644 --- a/src/ol/render/webgl/LineStringReplay.js +++ b/src/ol/render/webgl/LineStringReplay.js @@ -51,21 +51,21 @@ class WebGLLineStringReplay extends WebGLReplay { /** * @private - * @type {Array.>} + * @type {Array>} */ this.styles_ = []; /** * @private - * @type {Array.} + * @type {Array} */ this.styleIndices_ = []; /** * @private - * @type {{strokeColor: (Array.|null), + * @type {{strokeColor: (Array|null), * lineCap: (string|undefined), - * lineDash: Array., + * lineDash: Array, * lineDashOffset: (number|undefined), * lineJoin: (string|undefined), * lineWidth: (number|undefined), @@ -88,7 +88,7 @@ class WebGLLineStringReplay extends WebGLReplay { /** * Draw one segment. * @private - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -269,9 +269,9 @@ class WebGLLineStringReplay extends WebGLReplay { } /** - * @param {Array.} p0 Last coordinates. - * @param {Array.} p1 Current coordinates. - * @param {Array.} p2 Next coordinates. + * @param {Array} p0 Last coordinates. + * @param {Array} p1 Current coordinates. + * @param {Array} p2 Next coordinates. * @param {number} product Sign, instruction, and rounding product. * @param {number} numVertices Vertex counter. * @return {number} Vertex counter. @@ -291,7 +291,7 @@ class WebGLLineStringReplay extends WebGLReplay { /** * Check if the linestring can be drawn (i. e. valid). - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -362,8 +362,8 @@ class WebGLLineStringReplay extends WebGLReplay { } /** - * @param {Array.} flatCoordinates Flat coordinates. - * @param {Array.>} holeFlatCoordinates Hole flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. + * @param {Array>} holeFlatCoordinates Hole flat coordinates. * @param {number} stride Stride. */ drawPolygonCoordinates(flatCoordinates, holeFlatCoordinates, stride) { @@ -611,7 +611,7 @@ class WebGLLineStringReplay extends WebGLReplay { /** * @private * @param {WebGLRenderingContext} gl gl. - * @param {Array.} color Color. + * @param {Array} color Color. * @param {number} lineWidth Line width. * @param {number} miterLimit Miter limit. */ diff --git a/src/ol/render/webgl/PolygonReplay.js b/src/ol/render/webgl/PolygonReplay.js index 84edb993d8..4b3787d3d0 100644 --- a/src/ol/render/webgl/PolygonReplay.js +++ b/src/ol/render/webgl/PolygonReplay.js @@ -55,19 +55,19 @@ class WebGLPolygonReplay extends WebGLReplay { /** * @private - * @type {Array.>} + * @type {Array>} */ this.styles_ = []; /** * @private - * @type {Array.} + * @type {Array} */ this.styleIndices_ = []; /** * @private - * @type {{fillColor: (Array.|null), + * @type {{fillColor: (Array|null), * changed: boolean}|null} */ this.state_ = { @@ -79,8 +79,8 @@ class WebGLPolygonReplay extends WebGLReplay { /** * Draw one polygon. - * @param {Array.} flatCoordinates Flat coordinates. - * @param {Array.>} holeFlatCoordinates Hole flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. + * @param {Array>} holeFlatCoordinates Hole flat coordinates. * @param {number} stride Stride. * @private */ @@ -141,7 +141,7 @@ class WebGLPolygonReplay extends WebGLReplay { /** * Inserts flat coordinates in a linked list and adds them to the vertex buffer. * @private - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} stride Stride. * @param {module:ol/structs/LinkedList} list Linked list. * @param {module:ol/structs/RBush} rtree R-Tree of the polygon. @@ -195,7 +195,7 @@ class WebGLPolygonReplay extends WebGLReplay { * Returns the rightmost coordinates of a polygon on the X axis. * @private * @param {module:ol/structs/LinkedList} list Polygons ring. - * @return {Array.} Max X coordinates. + * @return {Array} Max X coordinates. */ getMaxCoords_(list) { const start = list.firstItem(); @@ -643,7 +643,7 @@ class WebGLPolygonReplay extends WebGLReplay { * @param {module:ol/render/webgl/PolygonReplay~PolygonVertex} p2 Third point. * @param {module:ol/structs/RBush} rtree R-Tree of the polygon. * @param {boolean=} opt_reflex Only include reflex points. - * @return {Array.} Points in the triangle. + * @return {Array} Points in the triangle. */ getPointsInTriangle_(p0, p1, p2, rtree, opt_reflex) { const result = []; @@ -670,7 +670,7 @@ class WebGLPolygonReplay extends WebGLReplay { * @param {module:ol/render/webgl/PolygonReplay~PolygonSegment} segment Segment. * @param {module:ol/structs/RBush} rtree R-Tree of the polygon. * @param {boolean=} opt_touch Touching segments should be considered an intersection. - * @return {Array.} Intersecting segments. + * @return {Array} Intersecting segments. */ getIntersections_(segment, rtree, opt_touch) { const p0 = segment.p0; @@ -698,7 +698,7 @@ class WebGLPolygonReplay extends WebGLReplay { * @param {module:ol/render/webgl/PolygonReplay~PolygonVertex} p2 Third point. * @param {module:ol/render/webgl/PolygonReplay~PolygonVertex} p3 Fourth point. * @param {boolean=} opt_touch Touching segments should be considered an intersection. - * @return {Array.|undefined} Intersection coordinates. + * @return {Array|undefined} Intersection coordinates. */ calculateIntersection_(p0, p1, p2, p3, opt_touch) { const denom = (p3.y - p2.y) * (p1.x - p0.x) - (p3.x - p2.x) * (p1.y - p0.y); @@ -1005,7 +1005,7 @@ class WebGLPolygonReplay extends WebGLReplay { /** * @private * @param {WebGLRenderingContext} gl gl. - * @param {Array.} color Color. + * @param {Array} color Color. */ setFillStyle_(gl, color) { gl.uniform4fv(this.defaultLocations_.u_color, color); diff --git a/src/ol/render/webgl/Replay.js b/src/ol/render/webgl/Replay.js index 5a74456316..4a545bf5ef 100644 --- a/src/ol/render/webgl/Replay.js +++ b/src/ol/render/webgl/Replay.js @@ -66,13 +66,13 @@ class WebGLReplay extends VectorContext { /** * @private - * @type {Array.} + * @type {Array} */ this.tmpMat4_ = create(); /** * @protected - * @type {Array.} + * @type {Array} */ this.indices = []; @@ -85,20 +85,20 @@ class WebGLReplay extends VectorContext { /** * Start index per feature (the index). * @protected - * @type {Array.} + * @type {Array} */ this.startIndices = []; /** * Start index per feature (the feature). * @protected - * @type {Array.} + * @type {Array} */ this.startIndicesFeature = []; /** * @protected - * @type {Array.} + * @type {Array} */ this.vertices = []; diff --git a/src/ol/render/webgl/ReplayGroup.js b/src/ol/render/webgl/ReplayGroup.js index 0891ec3f9f..edd2f380ec 100644 --- a/src/ol/render/webgl/ReplayGroup.js +++ b/src/ol/render/webgl/ReplayGroup.js @@ -14,7 +14,7 @@ import WebGLPolygonReplay from '../webgl/PolygonReplay.js'; import WebGLTextReplay from '../webgl/TextReplay.js'; /** - * @type {Array.} + * @type {Array} */ const HIT_DETECTION_SIZE = [1, 1]; @@ -160,7 +160,7 @@ class WebGLReplayGroup extends ReplayGroup { opacity, skippedFeaturesHash ) { - /** @type {Array.} */ + /** @type {Array} */ const zs = Object.keys(this.replaysByZIndex_).map(Number); zs.sort(numberSafeCompareFunction); @@ -209,7 +209,7 @@ class WebGLReplayGroup extends ReplayGroup { oneByOne, opt_hitExtent ) { - /** @type {Array.} */ + /** @type {Array} */ const zs = Object.keys(this.replaysByZIndex_).map(Number); zs.sort(function(a, b) { return b - a; diff --git a/src/ol/render/webgl/TextReplay.js b/src/ol/render/webgl/TextReplay.js index 93407d902d..4d55b73ea6 100644 --- a/src/ol/render/webgl/TextReplay.js +++ b/src/ol/render/webgl/TextReplay.js @@ -32,13 +32,13 @@ class WebGLTextReplay extends WebGLTextureReplay { /** * @private - * @type {Array.} + * @type {Array} */ this.images_ = []; /** * @private - * @type {Array.} + * @type {Array} */ this.textures_ = []; @@ -52,7 +52,7 @@ class WebGLTextReplay extends WebGLTextureReplay { * @private * @type {{strokeColor: (module:ol/colorlike~ColorLike|null), * lineCap: (string|undefined), - * lineDash: Array., + * lineDash: Array, * lineDashOffset: (number|undefined), * lineJoin: (string|undefined), * lineWidth: number, @@ -209,8 +209,8 @@ class WebGLTextReplay extends WebGLTextureReplay { /** * @private - * @param {Array.} lines Label to draw split to lines. - * @return {Array.} Size of the label in pixels. + * @param {Array} lines Label to draw split to lines. + * @return {Array} Size of the label in pixels. */ getTextSize_(lines) { const self = this; @@ -236,7 +236,7 @@ class WebGLTextReplay extends WebGLTextureReplay { /** * @private - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -427,7 +427,7 @@ class WebGLTextReplay extends WebGLTextureReplay { /** * @private - * @param {Array.} params Array of parameters. + * @param {Array} params Array of parameters. * @return {string} Hash string. */ calculateHash_(params) { diff --git a/src/ol/render/webgl/TextureReplay.js b/src/ol/render/webgl/TextureReplay.js index 60302eb5dc..a851d6c56b 100644 --- a/src/ol/render/webgl/TextureReplay.js +++ b/src/ol/render/webgl/TextureReplay.js @@ -31,13 +31,13 @@ class WebGLTextureReplay extends WebGLReplay { this.anchorY = undefined; /** - * @type {Array.} + * @type {Array} * @protected */ this.groupIndices = []; /** - * @type {Array.} + * @type {Array} * @protected */ this.hitDetectionGroupIndices = []; @@ -130,7 +130,7 @@ class WebGLTextureReplay extends WebGLReplay { } /** - * @param {Array.} flatCoordinates Flat coordinates. + * @param {Array} flatCoordinates Flat coordinates. * @param {number} offset Offset. * @param {number} end End. * @param {number} stride Stride. @@ -233,8 +233,8 @@ class WebGLTextureReplay extends WebGLReplay { /** * @protected - * @param {Array.} textures Textures. - * @param {Array.} images Images. + * @param {Array} textures Textures. + * @param {Array} images Images. * @param {!Object.} texturePerImage Texture cache. * @param {WebGLRenderingContext} gl Gl. */ @@ -353,8 +353,8 @@ class WebGLTextureReplay extends WebGLReplay { * @param {module:ol/webgl/Context} context Context. * @param {Object.} skippedFeaturesHash Ids of features * to skip. - * @param {Array.} textures Textures. - * @param {Array.} groupIndices Texture group indices. + * @param {Array} textures Textures. + * @param {Array} groupIndices Texture group indices. */ drawReplaySkipping(gl, context, skippedFeaturesHash, textures, groupIndices) { let featureIndex = 0; @@ -462,14 +462,14 @@ class WebGLTextureReplay extends WebGLReplay { * @abstract * @protected * @param {boolean=} opt_all Return hit detection textures with regular ones. - * @returns {Array.} Textures. + * @returns {Array} Textures. */ getTextures(opt_all) {} /** * @abstract * @protected - * @returns {Array.} Textures. + * @returns {Array} Textures. */ getHitDetectionTextures() {} } diff --git a/src/ol/renderer/Map.js b/src/ol/renderer/Map.js index 40a56d721d..9ab550daef 100644 --- a/src/ol/renderer/Map.js +++ b/src/ol/renderer/Map.js @@ -40,7 +40,7 @@ class MapRenderer extends Disposable { /** * @private - * @type {Array.} + * @type {Array} */ this.layerRendererConstructors_ = []; @@ -48,7 +48,7 @@ class MapRenderer extends Disposable { /** * Register layer renderer constructors. - * @param {Array.} constructors Layer renderers. + * @param {Array} constructors Layer renderers. */ registerLayerRenderers(constructors) { this.layerRendererConstructors_.push.apply(this.layerRendererConstructors_, constructors); @@ -56,7 +56,7 @@ class MapRenderer extends Disposable { /** * Get the registered layer renderer constructors. - * @return {Array.} Registered layer renderers. + * @return {Array} Registered layer renderers. */ getLayerRendererConstructors() { return this.layerRendererConstructors_; diff --git a/src/ol/renderer/canvas/ImageLayer.js b/src/ol/renderer/canvas/ImageLayer.js index 776a859222..f4810c21b5 100644 --- a/src/ol/renderer/canvas/ImageLayer.js +++ b/src/ol/renderer/canvas/ImageLayer.js @@ -40,7 +40,7 @@ class CanvasImageLayerRenderer extends IntermediateCanvasRenderer { this.imageTransform_ = createTransform(); /** - * @type {!Array.} + * @type {!Array} */ this.skippedFeatures_ = []; diff --git a/src/ol/renderer/canvas/Map.js b/src/ol/renderer/canvas/Map.js index 3f30a9547c..34293f96ea 100644 --- a/src/ol/renderer/canvas/Map.js +++ b/src/ol/renderer/canvas/Map.js @@ -15,7 +15,7 @@ import SourceState from '../../source/State.js'; /** - * @type {Array.} + * @type {Array} */ export const layerRendererConstructors = []; diff --git a/src/ol/renderer/canvas/TileLayer.js b/src/ol/renderer/canvas/TileLayer.js index f0e6a7f46b..8ca712dfe8 100644 --- a/src/ol/renderer/canvas/TileLayer.js +++ b/src/ol/renderer/canvas/TileLayer.js @@ -52,7 +52,7 @@ class CanvasTileLayerRenderer extends IntermediateCanvasRenderer { /** * @protected - * @type {!Array.} + * @type {!Array} */ this.renderedTiles = []; @@ -241,7 +241,7 @@ class CanvasTileLayerRenderer extends IntermediateCanvasRenderer { } this.renderedTiles.length = 0; - /** @type {Array.} */ + /** @type {Array} */ const zs = Object.keys(tilesToDrawByZ).map(Number); zs.sort(function(a, b) { if (a === z) { diff --git a/src/ol/renderer/canvas/VectorLayer.js b/src/ol/renderer/canvas/VectorLayer.js index b5b60304eb..d007af9a2b 100644 --- a/src/ol/renderer/canvas/VectorLayer.js +++ b/src/ol/renderer/canvas/VectorLayer.js @@ -352,7 +352,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { } }.bind(this); if (vectorLayerRenderOrder) { - /** @type {Array.} */ + /** @type {Array} */ const features = []; vectorSource.forEachFeatureInExtent(extent, /** @@ -384,7 +384,7 @@ class CanvasVectorLayerRenderer extends CanvasLayerRenderer { * @param {module:ol/Feature} feature Feature. * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. - * @param {module:ol/style/Style|Array.} styles The style or array of styles. + * @param {module:ol/style/Style|Array} styles The style or array of styles. * @param {module:ol/render/canvas/ReplayGroup} replayGroup Replay group. * @return {boolean} `true` if an image is loading. */ diff --git a/src/ol/renderer/canvas/VectorTileLayer.js b/src/ol/renderer/canvas/VectorTileLayer.js index 54ab69d5ac..21ea643d28 100644 --- a/src/ol/renderer/canvas/VectorTileLayer.js +++ b/src/ol/renderer/canvas/VectorTileLayer.js @@ -28,7 +28,7 @@ import { /** - * @type {!Object.>} + * @type {!Object.>} */ const IMAGE_REPLAYS = { 'image': [ReplayType.POLYGON, ReplayType.CIRCLE, @@ -38,7 +38,7 @@ const IMAGE_REPLAYS = { /** - * @type {!Object.>} + * @type {!Object.>} */ const VECTOR_REPLAYS = { 'image': [ReplayType.DEFAULT], @@ -237,7 +237,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { /** @type {!Object.} */ const features = {}; - /** @type {Array.} */ + /** @type {Array} */ const renderedTiles = this.renderedTiles; let bufferedExtent, found; @@ -410,7 +410,7 @@ class CanvasVectorTileLayerRenderer extends CanvasTileLayerRenderer { /** * @param {module:ol/Feature|module:ol/render/Feature} feature Feature. * @param {number} squaredTolerance Squared tolerance. - * @param {module:ol/style/Style|Array.} styles The style or array of styles. + * @param {module:ol/style/Style|Array} styles The style or array of styles. * @param {module:ol/render/canvas/ReplayGroup} replayGroup Replay group. * @return {boolean} `true` if an image is loading. */ diff --git a/src/ol/renderer/webgl/Layer.js b/src/ol/renderer/webgl/Layer.js index 70060f1ac6..edc8e142a4 100644 --- a/src/ol/renderer/webgl/Layer.js +++ b/src/ol/renderer/webgl/Layer.js @@ -72,7 +72,7 @@ class WebGLLayerRenderer extends LayerRenderer { this.projectionMatrix = createTransform(); /** - * @type {Array.} + * @type {Array} * @private */ this.tmpMat4_ = create(); diff --git a/src/ol/renderer/webgl/Map.js b/src/ol/renderer/webgl/Map.js index c87e35895f..00f9f2968f 100644 --- a/src/ol/renderer/webgl/Map.js +++ b/src/ol/renderer/webgl/Map.js @@ -129,7 +129,7 @@ class WebGLMapRenderer extends MapRenderer { */ this.tileTextureQueue_ = new PriorityQueue( /** - * @param {Array.<*>} element Element. + * @param {Array<*>} element Element. * @return {number} Priority. * @this {module:ol/renderer/webgl/Map} */ @@ -142,7 +142,7 @@ class WebGLMapRenderer extends MapRenderer { Math.sqrt(deltaX * deltaX + deltaY * deltaY) / tileResolution; }).bind(this), /** - * @param {Array.<*>} element Element. + * @param {Array<*>} element Element. * @return {string} Key. */ function(element) { @@ -413,7 +413,7 @@ class WebGLMapRenderer extends MapRenderer { this.dispatchComposeEvent_(RenderEventType.PRECOMPOSE, frameState); - /** @type {Array.} */ + /** @type {Array} */ const layerStatesToDraw = []; const layerStatesArray = frameState.layerStatesArray; stableSort(layerStatesArray, sortByZIndex); diff --git a/src/ol/renderer/webgl/TileLayer.js b/src/ol/renderer/webgl/TileLayer.js index 9206ef9182..6335cd3b62 100644 --- a/src/ol/renderer/webgl/TileLayer.js +++ b/src/ol/renderer/webgl/TileLayer.js @@ -273,7 +273,7 @@ class WebGLTileLayerRenderer extends WebGLLayerRenderer { } - /** @type {Array.} */ + /** @type {Array} */ const zs = Object.keys(tilesToDrawByZ).map(Number); zs.sort(numberSafeCompareFunction); const u_tileOffset = new Float32Array(4); diff --git a/src/ol/renderer/webgl/VectorLayer.js b/src/ol/renderer/webgl/VectorLayer.js index 5b58cb4164..47e875a6f4 100644 --- a/src/ol/renderer/webgl/VectorLayer.js +++ b/src/ol/renderer/webgl/VectorLayer.js @@ -247,7 +247,7 @@ class WebGLVectorLayerRenderer extends WebGLLayerRenderer { } }; if (vectorLayerRenderOrder) { - /** @type {Array.} */ + /** @type {Array} */ const features = []; vectorSource.forEachFeatureInExtent(extent, /** @@ -276,7 +276,7 @@ class WebGLVectorLayerRenderer extends WebGLLayerRenderer { * @param {module:ol/Feature} feature Feature. * @param {number} resolution Resolution. * @param {number} pixelRatio Pixel ratio. - * @param {module:ol/style/Style|Array.} styles The style or array of + * @param {module:ol/style/Style|Array} styles The style or array of * styles. * @param {module:ol/render/webgl/ReplayGroup} replayGroup Replay group. * @return {boolean} `true` if an image is loading. diff --git a/src/ol/reproj.js b/src/ol/reproj.js index a6bbdc8b22..c5f5e9fe21 100644 --- a/src/ol/reproj.js +++ b/src/ol/reproj.js @@ -83,7 +83,7 @@ function enlargeClipPoint(centroidX, centroidY, x, y) { * @param {module:ol/extent~Extent} targetExtent Target extent. * @param {module:ol/reproj/Triangulation} triangulation * Calculated triangulation. - * @param {Array.<{extent: module:ol/extent~Extent, + * @param {Array<{extent: module:ol/extent~Extent, * image: (HTMLCanvasElement|HTMLImageElement|HTMLVideoElement)}>} sources * Array of sources. * @param {number} gutter Gutter of the sources. diff --git a/src/ol/reproj/Tile.js b/src/ol/reproj/Tile.js index 53c7918a06..87a38e25de 100644 --- a/src/ol/reproj/Tile.js +++ b/src/ol/reproj/Tile.js @@ -98,13 +98,13 @@ class ReprojTile extends Tile { /** * @private - * @type {!Array.} + * @type {!Array} */ this.sourceTiles_ = []; /** * @private - * @type {Array.} + * @type {Array} */ this.sourcesListenerKeys_ = null; diff --git a/src/ol/reproj/Triangulation.js b/src/ol/reproj/Triangulation.js index 4a480524c3..9872d8df5b 100644 --- a/src/ol/reproj/Triangulation.js +++ b/src/ol/reproj/Triangulation.js @@ -10,8 +10,8 @@ import {getTransform} from '../proj.js'; /** * Single triangle; consists of 3 source points and 3 target points. * @typedef {Object} Triangle - * @property {Array.} source - * @property {Array.} target + * @property {Array} source + * @property {Array} target */ @@ -94,7 +94,7 @@ class Triangulation { this.errorThresholdSquared_ = errorThreshold * errorThreshold; /** - * @type {Array.} + * @type {Array} * @private */ this.triangles_ = []; @@ -343,7 +343,7 @@ class Triangulation { } /** - * @return {Array.} Array of the calculated triangles. + * @return {Array} Array of the calculated triangles. */ getTriangles() { return this.triangles_; diff --git a/src/ol/resolutionconstraint.js b/src/ol/resolutionconstraint.js index 8e58775a19..3114b1194c 100644 --- a/src/ol/resolutionconstraint.js +++ b/src/ol/resolutionconstraint.js @@ -11,7 +11,7 @@ import {clamp} from './math.js'; /** - * @param {Array.} resolutions Resolutions. + * @param {Array} resolutions Resolutions. * @return {module:ol/resolutionconstraint~Type} Zoom function. */ export function createSnapToResolutions(resolutions) { diff --git a/src/ol/size.js b/src/ol/size.js index 8c73d4ac99..f8c68477e3 100644 --- a/src/ol/size.js +++ b/src/ol/size.js @@ -5,7 +5,7 @@ /** * An array of numbers representing a size: `[width, height]`. - * @typedef {Array.} Size + * @typedef {Array} Size * @api */ diff --git a/src/ol/source/Cluster.js b/src/ol/source/Cluster.js index 29be1606ea..c8f7d17396 100644 --- a/src/ol/source/Cluster.js +++ b/src/ol/source/Cluster.js @@ -68,7 +68,7 @@ class Cluster extends VectorSource { this.distance = options.distance !== undefined ? options.distance : 20; /** - * @type {Array.} + * @type {Array} * @protected */ this.features = []; @@ -189,7 +189,7 @@ class Cluster extends VectorSource { } /** - * @param {Array.} features Features + * @param {Array} features Features * @return {module:ol/Feature} The cluster feature. * @protected */ diff --git a/src/ol/source/Image.js b/src/ol/source/Image.js index 69067cb910..0319b43f53 100644 --- a/src/ol/source/Image.js +++ b/src/ol/source/Image.js @@ -72,7 +72,7 @@ class ImageSourceEvent extends Event { * @property {module:ol/source/Source~AttributionLike} [attributions] * @property {module:ol/extent~Extent} [extent] * @property {module:ol/proj~ProjectionLike} projection - * @property {Array.} [resolutions] + * @property {Array} [resolutions] * @property {module:ol/source/State} [state] */ @@ -98,7 +98,7 @@ class ImageSource extends Source { /** * @private - * @type {Array.} + * @type {Array} */ this.resolutions_ = options.resolutions !== undefined ? options.resolutions : null; @@ -119,7 +119,7 @@ class ImageSource extends Source { } /** - * @return {Array.} Resolutions. + * @return {Array} Resolutions. * @override */ getResolutions() { diff --git a/src/ol/source/ImageArcGISRest.js b/src/ol/source/ImageArcGISRest.js index d714f97b15..1a98caa48d 100644 --- a/src/ol/source/ImageArcGISRest.js +++ b/src/ol/source/ImageArcGISRest.js @@ -32,7 +32,7 @@ import {appendParams} from '../uri.js'; * @property {module:ol/proj~ProjectionLike} projection Projection. * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, * `2` means twice the size of the map viewport, and so on. - * @property {Array.} [resolutions] Resolutions. If specified, requests will be made for + * @property {Array} [resolutions] Resolutions. If specified, requests will be made for * these resolutions only. * @property {string} [url] ArcGIS Rest service URL for a Map Service or Image Service. The url * should include /MapServer or /ImageServer. diff --git a/src/ol/source/ImageCanvas.js b/src/ol/source/ImageCanvas.js index adc24b3d88..e6313c26e6 100644 --- a/src/ol/source/ImageCanvas.js +++ b/src/ol/source/ImageCanvas.js @@ -36,7 +36,7 @@ import ImageSource from '../source/Image.js'; * @property {module:ol/proj~ProjectionLike} projection Projection. * @property {number} [ratio=1.5] Ratio. 1 means canvases are the size of the map viewport, 2 means twice the * width and height of the map viewport, and so on. Must be `1` or higher. - * @property {Array.} [resolutions] Resolutions. + * @property {Array} [resolutions] Resolutions. * If specified, new canvases will be created for these resolutions * @property {module:ol/source/State} [state] Source state. */ diff --git a/src/ol/source/ImageMapGuide.js b/src/ol/source/ImageMapGuide.js index fb7ed67584..0ff28a005e 100644 --- a/src/ol/source/ImageMapGuide.js +++ b/src/ol/source/ImageMapGuide.js @@ -25,7 +25,7 @@ import {appendParams} from '../uri.js'; * @property {module:ol/proj~ProjectionLike} projection Projection. * @property {number} [ratio=1] Ratio. `1` means image requests are the size of the map viewport, `2` means * twice the width and height of the map viewport, and so on. Must be `1` or higher. - * @property {Array.} [resolutions] Resolutions. + * @property {Array} [resolutions] Resolutions. * If specified, requests will be made for these resolutions only. * @property {module:ol/Image~LoadFunction} [imageLoadFunction] Optional function to load an image given a URL. * @property {Object} [params] Additional parameters. diff --git a/src/ol/source/ImageWMS.js b/src/ol/source/ImageWMS.js index f08853e9ce..a73ad2716b 100644 --- a/src/ol/source/ImageWMS.js +++ b/src/ol/source/ImageWMS.js @@ -45,7 +45,7 @@ const GETFEATUREINFO_IMAGE_SIZE = [101, 101]; * @property {number} [ratio=1.5] Ratio. `1` means image requests are the size of the map viewport, `2` means * twice the width and height of the map viewport, and so on. Must be `1` or * higher. - * @property {Array.} [resolutions] Resolutions. + * @property {Array} [resolutions] Resolutions. * If specified, requests will be made for these resolutions only. * @property {string} url WMS service URL. */ diff --git a/src/ol/source/Raster.js b/src/ol/source/Raster.js index 4c842e9008..7855922312 100644 --- a/src/ol/source/Raster.js +++ b/src/ol/source/Raster.js @@ -37,8 +37,8 @@ import {create as createTransform} from '../transform.js'; * data object is accessible from raster events, where it can be initialized in * "beforeoperations" and accessed again in "afteroperations". * - * @typedef {function((Array.>|Array.), Object): - * (Array.|ImageData)} Operation + * @typedef {function((Array>|Array), Object): + * (Array|ImageData)} Operation */ @@ -114,7 +114,7 @@ class RasterSourceEvent extends Event { /** * @typedef {Object} Options - * @property {Array.} sources Input + * @property {Array} sources Input * sources or layers. Vector layers must be configured with `renderMode: 'image'`. * @property {module:ol/source/Raster~Operation} [operation] Raster operation. * The operation will be called with data from input sources @@ -170,7 +170,7 @@ class RasterSource extends ImageSource { /** * @private - * @type {Array.} + * @type {Array} */ this.renderers_ = createRenderers(options.sources); @@ -455,8 +455,8 @@ function getImageData(renderer, frameState, layerState) { /** * Get a list of layer states from a list of renderers. - * @param {Array.} renderers Layer renderers. - * @return {Array.} The layer states. + * @param {Array} renderers Layer renderers. + * @return {Array} The layer states. */ function getLayerStatesArray(renderers) { return renderers.map(function(renderer) { @@ -467,8 +467,8 @@ function getLayerStatesArray(renderers) { /** * Create renderers for all sources. - * @param {Array.} sources The sources. - * @return {Array.} Array of layer renderers. + * @param {Array} sources The sources. + * @return {Array} Array of layer renderers. */ function createRenderers(sources) { const len = sources.length; diff --git a/src/ol/source/Source.js b/src/ol/source/Source.js index 757f105f78..c6dacdcf47 100644 --- a/src/ol/source/Source.js +++ b/src/ol/source/Source.js @@ -12,7 +12,7 @@ import SourceState from '../source/State.js'; * A function that returns a string or an array of strings representing source * attributions. * - * @typedef {function(module:ol/PluggableMap~FrameState): (string|Array.)} Attribution + * @typedef {function(module:ol/PluggableMap~FrameState): (string|Array)} Attribution */ @@ -24,7 +24,7 @@ import SourceState from '../source/State.js'; * * an array of simple strings (e.g. `['© Acme Inc.', '© Bacme Inc.']`) * * a function that returns a string or array of strings (`{@link module:ol/source/Source~Attribution}`) * - * @typedef {string|Array.|module:ol/source/Source~Attribution} AttributionLike + * @typedef {string|Array|module:ol/source/Source~Attribution} AttributionLike */ @@ -124,7 +124,7 @@ class Source extends BaseObject { /** * @abstract - * @return {Array.|undefined} Resolutions. + * @return {Array|undefined} Resolutions. */ getResolutions() {} diff --git a/src/ol/source/Stamen.js b/src/ol/source/Stamen.js index b722a2c802..3c42e9aff9 100644 --- a/src/ol/source/Stamen.js +++ b/src/ol/source/Stamen.js @@ -8,7 +8,7 @@ import XYZ from '../source/XYZ.js'; /** * @const - * @type {Array.} + * @type {Array} */ const ATTRIBUTIONS = [ 'Map tiles by Stamen Design, ' + diff --git a/src/ol/source/TileArcGISRest.js b/src/ol/source/TileArcGISRest.js index 5595f82f3d..2c5cc65995 100644 --- a/src/ol/source/TileArcGISRest.js +++ b/src/ol/source/TileArcGISRest.js @@ -46,7 +46,7 @@ import {appendParams} from '../uri.js'; * @property {boolean} [wrapX=true] Whether to wrap the world horizontally. * @property {number} [transition] Duration of the opacity transition for rendering. To disable the opacity * transition, pass `transition: 0`. - * @property {Array.} urls ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS + * @property {Array} urls ArcGIS Rest service urls. Use this instead of `url` when the ArcGIS * Service supports multiple urls for export requests. */ diff --git a/src/ol/source/TileImage.js b/src/ol/source/TileImage.js index 081047629e..77d599ccee 100644 --- a/src/ol/source/TileImage.js +++ b/src/ol/source/TileImage.js @@ -44,7 +44,7 @@ import {getForProjection as getTileGridForProjection} from '../tilegrid.js'; * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, and `{z}` placeholders. * A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, may be * used instead of defining each one separately in the `urls` option. - * @property {Array.} [urls] An array of URL templates. + * @property {Array} [urls] An array of URL templates. * @property {boolean} [wrapX] Whether to wrap the world horizontally. The default, is to * request out-of-bounds tiles from the server. When set to `false`, only one * world will be rendered. When set to `true`, tiles will be requested for one diff --git a/src/ol/source/TileWMS.js b/src/ol/source/TileWMS.js index 9a38a75b04..12fe4e41c8 100644 --- a/src/ol/source/TileWMS.js +++ b/src/ol/source/TileWMS.js @@ -60,7 +60,7 @@ import {appendParams} from '../uri.js'; * }; * ``` * @property {string} [url] WMS service URL. - * @property {Array.} [urls] WMS service urls. + * @property {Array} [urls] WMS service urls. * Use this instead of `url` when the WMS supports multiple urls for GetMap requests. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally. * When set to `false`, only one world diff --git a/src/ol/source/UTFGrid.js b/src/ol/source/UTFGrid.js index b1199d73af..19fafd1720 100644 --- a/src/ol/source/UTFGrid.js +++ b/src/ol/source/UTFGrid.js @@ -51,13 +51,13 @@ export class CustomTile extends Tile { /** * @private - * @type {Array.} + * @type {Array} */ this.grid_ = null; /** * @private - * @type {Array.} + * @type {Array} */ this.keys_ = null; diff --git a/src/ol/source/UrlTile.js b/src/ol/source/UrlTile.js index 2df79ee789..c5ff0f4382 100644 --- a/src/ol/source/UrlTile.js +++ b/src/ol/source/UrlTile.js @@ -21,7 +21,7 @@ import {getKeyZXY} from '../tilecoord.js'; * @property {number} [tilePixelRatio] * @property {module:ol/Tile~UrlFunction} [tileUrlFunction] * @property {string} [url] - * @property {Array.} [urls] + * @property {Array} [urls] * @property {boolean} [wrapX=true] * @property {number} [transition] */ @@ -67,7 +67,7 @@ class UrlTile extends TileSource { /** * @protected - * @type {!Array.|null} + * @type {!Array|null} */ this.urls = null; @@ -110,7 +110,7 @@ class UrlTile extends TileSource { * Return the URLs used for this source. * When a tileUrlFunction is used instead of url or urls, * null will be returned. - * @return {!Array.|null} URLs. + * @return {!Array|null} URLs. * @api */ getUrls() { @@ -182,7 +182,7 @@ class UrlTile extends TileSource { /** * Set the URLs to use for requests. - * @param {Array.} urls URLs. + * @param {Array} urls URLs. * @api */ setUrls(urls) { diff --git a/src/ol/source/Vector.js b/src/ol/source/Vector.js index af072081d9..82b067b31c 100644 --- a/src/ol/source/Vector.js +++ b/src/ol/source/Vector.js @@ -26,7 +26,7 @@ import RBush from '../structs/RBush.js'; * returns an array of {@link module:ol/extent~Extent} with the extents to load. Usually this * is one of the standard {@link module:ol/loadingstrategy} strategies. * - * @typedef {function(module:ol/extent~Extent, number): Array.} LoadingStrategy + * @typedef {function(module:ol/extent~Extent, number): Array} LoadingStrategy * @api */ @@ -61,7 +61,7 @@ export class VectorSourceEvent extends Event { /** * @typedef {Object} Options * @property {module:ol/source/Source~AttributionLike} [attributions] Attributions. - * @property {Array.|module:ol/Collection.} [features] + * @property {Array|module:ol/Collection.} [features] * Features. If provided as {@link module:ol/Collection}, the features in the source * and the collection will stay in sync. * @property {module:ol/format/Feature} [format] The feature format used by the XHR @@ -247,7 +247,7 @@ class VectorSource extends Source { /** * @private - * @type {Object.>} + * @type {Object.>} */ this.featureChangeKeys_ = {}; @@ -365,7 +365,7 @@ VectorSource.prototype.addToIndex_ = function(featureKey, feature) { /** * Add a batch of features to the source. - * @param {Array.} features Features to add. + * @param {Array} features Features to add. * @api */ VectorSource.prototype.addFeatures = function(features) { @@ -376,7 +376,7 @@ VectorSource.prototype.addFeatures = function(features) { /** * Add features without firing a `change` event. - * @param {Array.} features Features. + * @param {Array} features Features. * @protected */ VectorSource.prototype.addFeaturesInternal = function(features) { @@ -620,7 +620,7 @@ VectorSource.prototype.getFeaturesCollection = function() { /** * Get all features on the source in random order. - * @return {Array.} Features. + * @return {Array} Features. * @api */ VectorSource.prototype.getFeatures = function() { @@ -634,7 +634,7 @@ VectorSource.prototype.getFeatures = function() { } } return ( - /** @type {Array.} */ (features) + /** @type {Array} */ (features) ); }; @@ -642,7 +642,7 @@ VectorSource.prototype.getFeatures = function() { /** * Get all features whose geometry intersects the provided coordinate. * @param {module:ol/coordinate~Coordinate} coordinate Coordinate. - * @return {Array.} Features. + * @return {Array} Features. * @api */ VectorSource.prototype.getFeaturesAtCoordinate = function(coordinate) { @@ -662,7 +662,7 @@ VectorSource.prototype.getFeaturesAtCoordinate = function(coordinate) { * This method is not available when the source is configured with * `useSpatialIndex` set to `false`. * @param {module:ol/extent~Extent} extent Extent. - * @return {Array.} Features. + * @return {Array} Features. * @api */ VectorSource.prototype.getFeaturesInExtent = function(extent) { diff --git a/src/ol/source/VectorTile.js b/src/ol/source/VectorTile.js index a644f440b8..65e16d549a 100644 --- a/src/ol/source/VectorTile.js +++ b/src/ol/source/VectorTile.js @@ -50,7 +50,7 @@ import {createXYZ, extentFromProjection, createForProjection} from '../tilegrid. * used instead of defining each one separately in the `urls` option. * @property {number} [transition] A duration for tile opacity * transitions in milliseconds. A duration of 0 disables the opacity transition. - * @property {Array.} [urls] An array of URL templates. + * @property {Array} [urls] An array of URL templates. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally. * When set to `false`, only one world * will be rendered. When set to `true`, tiles will be wrapped horizontally to diff --git a/src/ol/source/WMTS.js b/src/ol/source/WMTS.js index 71debad16c..ebe3909c81 100644 --- a/src/ol/source/WMTS.js +++ b/src/ol/source/WMTS.js @@ -48,7 +48,7 @@ import {appendParams} from '../uri.js'; * imageTile.getImage().src = src; * }; * ``` - * @property {Array.} [urls] An array of URLs. + * @property {Array} [urls] An array of URLs. * Requests will be distributed among the URLs in this array. * @property {boolean} [wrapX=false] Whether to wrap the world horizontally. * @property {number} [transition] Duration of the opacity transition for rendering. @@ -328,7 +328,7 @@ export function optionsFromCapabilities(wmtsCap, config) { } const matrixSet = /** @type {string} */ (l['TileMatrixSetLink'][idx]['TileMatrixSet']); - const matrixLimits = /** @type {Array.} */ + const matrixLimits = /** @type {Array} */ (l['TileMatrixSetLink'][idx]['TileMatrixSetLimits']); let format = /** @type {string} */ (l['Format'][0]); @@ -399,7 +399,7 @@ export function optionsFromCapabilities(wmtsCap, config) { const tileGrid = createFromCapabilitiesMatrixSet(matrixSetObj, extent, matrixLimits); - /** @type {!Array.} */ + /** @type {!Array} */ const urls = []; let requestEncoding = config['requestEncoding']; requestEncoding = requestEncoding !== undefined ? requestEncoding : ''; diff --git a/src/ol/source/XYZ.js b/src/ol/source/XYZ.js index 1ec7b2bcfb..72f87d6beb 100644 --- a/src/ol/source/XYZ.js +++ b/src/ol/source/XYZ.js @@ -37,7 +37,7 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js'; * @property {string} [url] URL template. Must include `{x}`, `{y}` or `{-y}`, * and `{z}` placeholders. A `{?-?}` template pattern, for example `subdomain{a-f}.domain.com`, * may be used instead of defining each one separately in the `urls` option. - * @property {Array.} [urls] An array of URL templates. + * @property {Array} [urls] An array of URL templates. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally. * @property {number} [transition] Duration of the opacity transition for rendering. * To disable the opacity transition, pass `transition: 0`. diff --git a/src/ol/sphere.js b/src/ol/sphere.js index 082fc02a17..dd4f823cc3 100644 --- a/src/ol/sphere.js +++ b/src/ol/sphere.js @@ -143,7 +143,7 @@ export function getLength(geometry, opt_options) { * Polygons on a Sphere", JPL Publication 07-03, Jet Propulsion * Laboratory, Pasadena, CA, June 2007 * - * @param {Array.} coordinates List of coordinates of a linear + * @param {Array} coordinates List of coordinates of a linear * ring. If the ring is oriented clockwise, the area will be positive, * otherwise it will be negative. * @param {number} radius The sphere radius. diff --git a/src/ol/structs/LRUCache.js b/src/ol/structs/LRUCache.js index 7502cd30d2..b8ce54812a 100644 --- a/src/ol/structs/LRUCache.js +++ b/src/ol/structs/LRUCache.js @@ -174,7 +174,7 @@ class LRUCache extends EventTarget { /** - * @return {Array.} Keys. + * @return {Array} Keys. */ getKeys() { const keys = new Array(this.count_); @@ -188,7 +188,7 @@ class LRUCache extends EventTarget { /** - * @return {Array.} Values. + * @return {Array} Values. */ getValues() { const values = new Array(this.count_); diff --git a/src/ol/structs/PriorityQueue.js b/src/ol/structs/PriorityQueue.js index 8f98746147..8f3ca694da 100644 --- a/src/ol/structs/PriorityQueue.js +++ b/src/ol/structs/PriorityQueue.js @@ -44,13 +44,13 @@ class PriorityQueue { this.keyFunction_ = keyFunction; /** - * @type {Array.} + * @type {Array} * @private */ this.elements_ = []; /** - * @type {Array.} + * @type {Array} * @private */ this.priorities_ = []; diff --git a/src/ol/structs/RBush.js b/src/ol/structs/RBush.js index 47ab650261..96b6260009 100644 --- a/src/ol/structs/RBush.js +++ b/src/ol/structs/RBush.js @@ -65,8 +65,8 @@ class RBush { /** * Bulk-insert values into the RBush. - * @param {Array.} extents Extents. - * @param {Array.} values Values. + * @param {Array} extents Extents. + * @param {Array} values Values. */ load(extents, values) { const items = new Array(values.length); @@ -122,7 +122,7 @@ class RBush { /** * Return all values in the RBush. - * @return {Array.} All. + * @return {Array} All. */ getAll() { const items = this.rbush_.all(); @@ -135,7 +135,7 @@ class RBush { /** * Return all values in the given extent. * @param {module:ol/extent~Extent} extent Extent. - * @return {Array.} All in extent. + * @return {Array} All in extent. */ getInExtent(extent) { /** @type {module:ol/structs/RBush~Entry} */ @@ -180,7 +180,7 @@ class RBush { /** - * @param {Array.} values Values. + * @param {Array} values Values. * @param {function(this: S, T): *} callback Callback. * @param {S=} opt_this The object to use as `this` in `callback`. * @private diff --git a/src/ol/style/Atlas.js b/src/ol/style/Atlas.js index 659705ffbb..ca8ff398f2 100644 --- a/src/ol/style/Atlas.js +++ b/src/ol/style/Atlas.js @@ -58,7 +58,7 @@ class Atlas { /** * @private - * @type {Array.} + * @type {Array} */ this.emptyBlocks_ = [{x: 0, y: 0, width: size, height: size}]; diff --git a/src/ol/style/AtlasManager.js b/src/ol/style/AtlasManager.js index 140c9d27ef..39bb2d0a0e 100644 --- a/src/ol/style/AtlasManager.js +++ b/src/ol/style/AtlasManager.js @@ -90,7 +90,7 @@ class AtlasManager { /** * @private - * @type {Array.} + * @type {Array} */ this.atlases_ = [new Atlas(this.currentSize_, this.space_)]; @@ -103,7 +103,7 @@ class AtlasManager { /** * @private - * @type {Array.} + * @type {Array} */ this.hitAtlases_ = [new Atlas(this.currentHitSize_, this.space_)]; } @@ -127,7 +127,7 @@ class AtlasManager { /** * @private - * @param {Array.} atlases The atlases to search. + * @param {Array} atlases The atlases to search. * @param {string} id The identifier of the entry to check. * @return {?module:ol/style/Atlas~AtlasInfo} The position and atlas image for the entry, * or `null` if the entry is not part of the atlases. diff --git a/src/ol/style/Icon.js b/src/ol/style/Icon.js index 4cec671f57..3afc1050c1 100644 --- a/src/ol/style/Icon.js +++ b/src/ol/style/Icon.js @@ -15,7 +15,7 @@ import ImageStyle from '../style/Image.js'; /** * @typedef {Object} Options - * @property {Array.} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center. + * @property {Array} [anchor=[0.5, 0.5]] Anchor. Default value is the icon center. * @property {module:ol/style/IconOrigin} [anchorOrigin] Origin of the anchor: `bottom-left`, `bottom-right`, * `top-left` or `top-right`. Default is `top-left`. * @property {module:ol/style/IconAnchorUnits} [anchorXUnits] Units in which the anchor x value is @@ -32,7 +32,7 @@ import ImageStyle from '../style/Image.js'; * @property {HTMLImageElement|HTMLCanvasElement} [img] Image object for the icon. If the `src` option is not provided then the * provided image must already be loaded. And in that case, it is required * to provide the size of the image, with the `imgSize` option. - * @property {Array.} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the + * @property {Array} [offset=[0, 0]] Offset, which, together with the size and the offset origin, define the * sub-rectangle to use from the original icon image. * @property {module:ol/style/IconOrigin} [offsetOrigin] Origin of the offset: `bottom-left`, `bottom-right`, * `top-left` or `top-right`. Default is `top-left`. @@ -101,13 +101,13 @@ class Icon extends ImageStyle { /** * @private - * @type {Array.} + * @type {Array} */ this.anchor_ = options.anchor !== undefined ? options.anchor : [0.5, 0.5]; /** * @private - * @type {Array.} + * @type {Array} */ this.normalizedAnchor_ = null; @@ -186,7 +186,7 @@ class Icon extends ImageStyle { /** * @private - * @type {Array.} + * @type {Array} */ this.offset_ = options.offset !== undefined ? options.offset : [0, 0]; @@ -199,7 +199,7 @@ class Icon extends ImageStyle { /** * @private - * @type {Array.} + * @type {Array} */ this.origin_ = null; @@ -284,7 +284,7 @@ class Icon extends ImageStyle { * Set the anchor point. The anchor determines the center point for the * symbolizer. * - * @param {Array.} anchor Anchor. + * @param {Array} anchor Anchor. * @api */ setAnchor(anchor) { diff --git a/src/ol/style/IconImage.js b/src/ol/style/IconImage.js index 3b01ee9a94..f053cbabab 100644 --- a/src/ol/style/IconImage.js +++ b/src/ol/style/IconImage.js @@ -54,7 +54,7 @@ class IconImage extends EventTarget { /** * @private - * @type {Array.} + * @type {Array} */ this.imageListenerKeys_ = null; diff --git a/src/ol/style/Image.js b/src/ol/style/Image.js index 121d12e617..edfdba8cfb 100644 --- a/src/ol/style/Image.js +++ b/src/ol/style/Image.js @@ -107,7 +107,7 @@ class ImageStyle { * Get the anchor point in pixels. The anchor determines the center point for the * symbolizer. * @abstract - * @return {Array.} Anchor. + * @return {Array} Anchor. */ getAnchor() {} @@ -147,7 +147,7 @@ class ImageStyle { /** * Get the origin of the symbolizer. * @abstract - * @return {Array.} Origin. + * @return {Array} Origin. */ getOrigin() {} diff --git a/src/ol/style/RegularShape.js b/src/ol/style/RegularShape.js index b65d324e19..5264ce51d9 100644 --- a/src/ol/style/RegularShape.js +++ b/src/ol/style/RegularShape.js @@ -39,7 +39,7 @@ import ImageStyle from '../style/Image.js'; * @property {number} strokeWidth * @property {number} size * @property {string} lineCap - * @property {Array.} lineDash + * @property {Array} lineDash * @property {number} lineDashOffset * @property {string} lineJoin * @property {number} miterLimit @@ -80,7 +80,7 @@ class RegularShape extends ImageStyle { /** * @private - * @type {Array.} + * @type {Array} */ this.checksums_ = null; @@ -104,7 +104,7 @@ class RegularShape extends ImageStyle { /** * @private - * @type {Array.} + * @type {Array} */ this.origin_ = [0, 0]; @@ -141,7 +141,7 @@ class RegularShape extends ImageStyle { /** * @private - * @type {Array.} + * @type {Array} */ this.anchor_ = null; diff --git a/src/ol/style/Stroke.js b/src/ol/style/Stroke.js index b082d39832..fff414d9d2 100644 --- a/src/ol/style/Stroke.js +++ b/src/ol/style/Stroke.js @@ -11,7 +11,7 @@ import {getUid} from '../util.js'; * Default null; if null, the Canvas/renderer default black will be used. * @property {string} [lineCap='round'] Line cap style: `butt`, `round`, or `square`. * @property {string} [lineJoin='round'] Line join style: `bevel`, `round`, or `miter`. - * @property {Array.} [lineDash] Line dash pattern. Default is `undefined` (no dash). + * @property {Array} [lineDash] Line dash pattern. Default is `undefined` (no dash). * Please note that Internet Explorer 10 and lower do not support the `setLineDash` method on * the `CanvasRenderingContext2D` and therefore this option will have no visual effect in these browsers. * @property {number} [lineDashOffset=0] Line dash offset. @@ -50,7 +50,7 @@ class Stroke { /** * @private - * @type {Array.} + * @type {Array} */ this.lineDash_ = options.lineDash !== undefined ? options.lineDash : null; @@ -123,7 +123,7 @@ class Stroke { /** * Get the line dash style for the stroke. - * @return {Array.} Line dash. + * @return {Array} Line dash. * @api */ getLineDash() { @@ -197,7 +197,7 @@ class Stroke { * * [mdn]: https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash#Browser_compatibility * - * @param {Array.} lineDash Line dash. + * @param {Array} lineDash Line dash. * @api */ setLineDash(lineDash) { diff --git a/src/ol/style/Style.js b/src/ol/style/Style.js index 3be20ea926..4e812e1416 100644 --- a/src/ol/style/Style.js +++ b/src/ol/style/Style.js @@ -100,7 +100,7 @@ import Stroke from '../style/Stroke.js'; * vector layer can be styled. * * @typedef {function((module:ol/Feature|module:ol/render/Feature), number): - * (module:ol/style/Style|Array.)} StyleFunction + * (module:ol/style/Style|Array)} StyleFunction */ @@ -119,7 +119,7 @@ import Stroke from '../style/Stroke.js'; * 1. The pixel coordinates of the geometry in GeoJSON notation. * 2. The {@link module:ol/render~State} of the layer renderer. * - * @typedef {function((module:ol/coordinate~Coordinate|Array|Array.>),module:ol/render~State)} + * @typedef {function((module:ol/coordinate~Coordinate|Array|Array>),module:ol/render~State)} * RenderFunction */ @@ -394,7 +394,7 @@ class Style { * Convert the provided object into a style function. Functions passed through * unchanged. Arrays of module:ol/style/Style or single style objects wrapped in a * new style function. - * @param {module:ol/style/Style~StyleFunction|Array.|module:ol/style/Style} obj + * @param {module:ol/style/Style~StyleFunction|Array|module:ol/style/Style} obj * A style function, a single style, or an array of styles. * @return {module:ol/style/Style~StyleFunction} A style function. */ @@ -405,7 +405,7 @@ export function toFunction(obj) { styleFunction = obj; } else { /** - * @type {Array.} + * @type {Array} */ let styles; if (Array.isArray(obj)) { @@ -424,7 +424,7 @@ export function toFunction(obj) { /** - * @type {Array.} + * @type {Array} */ let defaultStyles = null; @@ -432,7 +432,7 @@ let defaultStyles = null; /** * @param {module:ol/Feature|module:ol/render/Feature} feature Feature. * @param {number} resolution Resolution. - * @return {Array.} Style. + * @return {Array} Style. */ export function createDefaultStyle(feature, resolution) { // We don't use an immediately-invoked function @@ -466,10 +466,10 @@ export function createDefaultStyle(feature, resolution) { /** * Default styles for editing features. - * @return {Object.>} Styles + * @return {Object.>} Styles */ export function createEditingStyle() { - /** @type {Object.>} */ + /** @type {Object.>} */ const styles = {}; const white = [255, 255, 255, 1]; const blue = [0, 153, 255, 1]; diff --git a/src/ol/style/Text.js b/src/ol/style/Text.js index 460f56b785..2206b8437c 100644 --- a/src/ol/style/Text.js +++ b/src/ol/style/Text.js @@ -40,7 +40,7 @@ const DEFAULT_FILL_COLOR = '#333'; * `'point'`. Default is no fill. * @property {module:ol/style/Stroke} [backgroundStroke] Stroke style for the text background when `placement` * is `'point'`. Default is no stroke. - * @property {Array.} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of + * @property {Array} [padding=[0, 0, 0, 0]] Padding in pixels around the text for decluttering and background. The order of * values in the array is `[top, right, bottom, left]`. */ @@ -157,7 +157,7 @@ class Text { /** * @private - * @type {Array.} + * @type {Array} */ this.padding_ = options.padding === undefined ? null : options.padding; } @@ -334,7 +334,7 @@ class Text { /** * Get the padding for the text. - * @return {Array.} Padding. + * @return {Array} Padding. * @api */ getPadding() { @@ -494,7 +494,7 @@ class Text { /** * Set the padding (`[top, right, bottom, left]`). * - * @param {!Array.} padding Padding. + * @param {!Array} padding Padding. * @api */ setPadding(padding) { diff --git a/src/ol/tilecoord.js b/src/ol/tilecoord.js index 02198fd6e1..6e312e5779 100644 --- a/src/ol/tilecoord.js +++ b/src/ol/tilecoord.js @@ -6,7 +6,7 @@ /** * An array of three numbers representing the location of a tile in a tile * grid. The order is `z`, `x`, and `y`. `z` is the zoom level. - * @typedef {Array.} TileCoord + * @typedef {Array} TileCoord * @api */ diff --git a/src/ol/tilegrid.js b/src/ol/tilegrid.js index 42af3a6f47..28cef0e19f 100644 --- a/src/ol/tilegrid.js +++ b/src/ol/tilegrid.js @@ -110,7 +110,7 @@ export function createXYZ(opt_options) { * DEFAULT_MAX_ZOOM). * @param {number|module:ol/size~Size=} opt_tileSize Tile size (default uses * DEFAULT_TILE_SIZE). - * @return {!Array.} Resolutions array. + * @return {!Array} Resolutions array. */ function resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize) { const maxZoom = opt_maxZoom !== undefined ? diff --git a/src/ol/tilegrid/TileGrid.js b/src/ol/tilegrid/TileGrid.js index 41234385b6..96c5f2c240 100644 --- a/src/ol/tilegrid/TileGrid.js +++ b/src/ol/tilegrid/TileGrid.js @@ -27,18 +27,18 @@ const tmpTileCoord = [0, 0, 0]; * @property {module:ol/coordinate~Coordinate} [origin] The tile grid origin, i.e. where the `x` * and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left to right and upwards. If not * specified, `extent` or `origins` must be provided. - * @property {Array.} [origins] Tile grid origins, i.e. where + * @property {Array} [origins] Tile grid origins, i.e. where * the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If given, the array length * should match the length of the `resolutions` array, i.e. each resolution can have a different * origin. Tile coordinates increase left to right and upwards. If not specified, `extent` or * `origin` must be provided. - * @property {!Array.} resolutions Resolutions. The array index of each resolution needs + * @property {!Array} resolutions Resolutions. The array index of each resolution needs * to match the zoom level. This means that even if a `minZoom` is configured, the resolutions * array will have a length of `maxZoom + 1`. - * @property {Array.} [sizes] Sizes. + * @property {Array} [sizes] Sizes. * @property {number|module:ol/size~Size} [tileSize] Tile size. * Default is `[256, 256]`. - * @property {Array.} [tileSizes] Tile sizes. If given, the array length + * @property {Array} [tileSizes] Tile sizes. If given, the array length * should match the length of the `resolutions` array, i.e. each resolution can have a different * tile size. */ @@ -64,7 +64,7 @@ class TileGrid { /** * @private - * @type {!Array.} + * @type {!Array} */ this.resolutions_ = options.resolutions; assert(isSorted(this.resolutions_, function(a, b) { @@ -109,7 +109,7 @@ class TileGrid { /** * @private - * @type {Array.} + * @type {Array} */ this.origins_ = null; if (options.origins !== undefined) { @@ -131,7 +131,7 @@ class TileGrid { /** * @private - * @type {Array.} + * @type {Array} */ this.tileSizes_ = null; if (options.tileSizes !== undefined) { @@ -161,7 +161,7 @@ class TileGrid { /** * @private - * @type {Array.} + * @type {Array} */ this.fullTileRanges_ = null; @@ -288,7 +288,7 @@ class TileGrid { /** * Get the list of resolutions for the tile grid. - * @return {Array.} Resolutions. + * @return {Array} Resolutions. * @api */ getResolutions() { diff --git a/src/ol/tilegrid/WMTS.js b/src/ol/tilegrid/WMTS.js index 6c7a24c68e..089638c96a 100644 --- a/src/ol/tilegrid/WMTS.js +++ b/src/ol/tilegrid/WMTS.js @@ -16,17 +16,17 @@ import TileGrid from '../tilegrid/TileGrid.js'; * @property {module:ol/coordinate~Coordinate} [origin] The tile grid origin, i.e. * where the `x` and `y` axes meet (`[z, 0, 0]`). Tile coordinates increase left * to right and upwards. If not specified, `extent` or `origins` must be provided. - * @property {Array.} [origins] Tile grid origins, + * @property {Array} [origins] Tile grid origins, * i.e. where the `x` and `y` axes meet (`[z, 0, 0]`), for each zoom level. If * given, the array length should match the length of the `resolutions` array, i.e. * each resolution can have a different origin. Tile coordinates increase left to * right and upwards. If not specified, `extent` or `origin` must be provided. - * @property {!Array.} resolutions Resolutions. The array index of each + * @property {!Array} resolutions Resolutions. The array index of each * resolution needs to match the zoom level. This means that even if a `minZoom` * is configured, the resolutions array will have a length of `maxZoom + 1` - * @property {!Array.} matrixIds matrix IDs. The length of this array needs + * @property {!Array} matrixIds matrix IDs. The length of this array needs * to match the length of the `resolutions` array. - * @property {Array.} [sizes] Number of tile rows and columns + * @property {Array} [sizes] Number of tile rows and columns * of the grid for each zoom level. The values here are the `TileMatrixWidth` and * `TileMatrixHeight` advertised in the GetCapabilities response of the WMTS, and * define the grid's extent together with the `origin`. @@ -35,9 +35,9 @@ import TileGrid from '../tilegrid/TileGrid.js'; * the `extent` is used as `origin` or `origins`, then the `y` value must be * negative because OpenLayers tile coordinates increase upwards. * @property {number|module:ol/size~Size} [tileSize] Tile size. - * @property {Array.} [tileSizes] Tile sizes. The length of + * @property {Array} [tileSizes] Tile sizes. The length of * this array needs to match the length of the `resolutions` array. - * @property {Array.} [widths] Number of tile columns that cover the grid's + * @property {Array} [widths] Number of tile columns that cover the grid's * extent for each zoom level. Only required when used with a source that has `wrapX` * set to `true`, and only when the grid's origin differs from the one of the * projection's extent. The array length has to match the length of the `resolutions` @@ -67,7 +67,7 @@ class WMTSTileGrid extends TileGrid { /** * @private - * @type {!Array.} + * @type {!Array} */ this.matrixIds_ = options.matrixIds; } @@ -82,7 +82,7 @@ class WMTSTileGrid extends TileGrid { /** * Get the list of matrix identifiers. - * @return {Array.} MatrixIds. + * @return {Array} MatrixIds. * @api */ getMatrixIds() { @@ -100,22 +100,22 @@ export default WMTSTileGrid; * capabilities document. * @param {module:ol/extent~Extent=} opt_extent An optional extent to restrict the tile * ranges the server provides. - * @param {Array.=} opt_matrixLimits An optional object representing + * @param {Array=} opt_matrixLimits An optional object representing * the available matrices for tileGrid. * @return {module:ol/tilegrid/WMTS} WMTS tileGrid instance. * @api */ export function createFromCapabilitiesMatrixSet(matrixSet, opt_extent, opt_matrixLimits) { - /** @type {!Array.} */ + /** @type {!Array} */ const resolutions = []; - /** @type {!Array.} */ + /** @type {!Array} */ const matrixIds = []; - /** @type {!Array.} */ + /** @type {!Array} */ const origins = []; - /** @type {!Array.} */ + /** @type {!Array} */ const tileSizes = []; - /** @type {!Array.} */ + /** @type {!Array} */ const sizes = []; const matrixLimits = opt_matrixLimits !== undefined ? opt_matrixLimits : []; diff --git a/src/ol/tileurlfunction.js b/src/ol/tileurlfunction.js index ceea29883a..8980363b2f 100644 --- a/src/ol/tileurlfunction.js +++ b/src/ol/tileurlfunction.js @@ -47,7 +47,7 @@ export function createFromTemplate(template, tileGrid) { /** - * @param {Array.} templates Templates. + * @param {Array} templates Templates. * @param {module:ol/tilegrid/TileGrid} tileGrid Tile grid. * @return {module:ol/Tile~UrlFunction} Tile URL function. */ @@ -62,7 +62,7 @@ export function createFromTemplates(templates, tileGrid) { /** - * @param {Array.} tileUrlFunctions Tile URL Functions. + * @param {Array} tileUrlFunctions Tile URL Functions. * @return {module:ol/Tile~UrlFunction} Tile URL function. */ export function createFromTileUrlFunctions(tileUrlFunctions) { @@ -102,7 +102,7 @@ export function nullTileUrlFunction(tileCoord, pixelRatio, projection) { /** * @param {string} url URL. - * @return {Array.} Array of urls. + * @return {Array} Array of urls. */ export function expandUrl(url) { const urls = []; diff --git a/src/ol/transform.js b/src/ol/transform.js index 98d279699f..15000536ed 100644 --- a/src/ol/transform.js +++ b/src/ol/transform.js @@ -7,7 +7,7 @@ import {assert} from './asserts.js'; /** * An array representing an affine 2d transformation for use with * {@link module:ol/transform} functions. The array has 6 elements. - * @typedef {!Array.} Transform + * @typedef {!Array} Transform */ diff --git a/src/ol/vec/mat4.js b/src/ol/vec/mat4.js index 37aa91cab4..6ef0cc011d 100644 --- a/src/ol/vec/mat4.js +++ b/src/ol/vec/mat4.js @@ -4,7 +4,7 @@ /** - * @return {Array.} 4x4 matrix representing a 3D identity transform. + * @return {Array} 4x4 matrix representing a 3D identity transform. */ export function create() { return [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]; @@ -12,9 +12,9 @@ export function create() { /** - * @param {Array.} mat4 Flattened 4x4 matrix receiving the result. + * @param {Array} mat4 Flattened 4x4 matrix receiving the result. * @param {module:ol/transform~Transform} transform Transformation matrix. - * @return {Array.} 2D transformation matrix as flattened 4x4 matrix. + * @return {Array} 2D transformation matrix as flattened 4x4 matrix. */ export function fromTransform(mat4, transform) { mat4[0] = transform[0]; diff --git a/src/ol/webgl.js b/src/ol/webgl.js index 85bf67ce2e..8b0ba9902c 100644 --- a/src/ol/webgl.js +++ b/src/ol/webgl.js @@ -259,7 +259,7 @@ export const FRAMEBUFFER = 0x8D40; /** * @const - * @type {Array.} + * @type {Array} */ const CONTEXT_IDS = [ 'experimental-webgl', @@ -308,7 +308,7 @@ let MAX_TEXTURE_SIZE; // value is set below /** * List of supported WebGL extensions. - * @type {Array.} + * @type {Array} */ let EXTENSIONS; // value is set below diff --git a/src/ol/webgl/Buffer.js b/src/ol/webgl/Buffer.js index f9d6786a21..a545f745bf 100644 --- a/src/ol/webgl/Buffer.js +++ b/src/ol/webgl/Buffer.js @@ -16,14 +16,14 @@ const BufferUsage = { class WebGLBuffer { /** - * @param {Array.=} opt_arr Array. + * @param {Array=} opt_arr Array. * @param {number=} opt_usage Usage. */ constructor(opt_arr, opt_usage) { /** * @private - * @type {Array.} + * @type {Array} */ this.arr_ = opt_arr !== undefined ? opt_arr : []; @@ -36,7 +36,7 @@ class WebGLBuffer { } /** - * @return {Array.} Array. + * @return {Array} Array. */ getArray() { return this.arr_; diff --git a/src/ol/xml.js b/src/ol/xml.js index d67c3407c3..a3105b1632 100644 --- a/src/ol/xml.js +++ b/src/ol/xml.js @@ -14,12 +14,12 @@ import {extend} from './array.js'; /** - * @typedef {function(Node, Array.<*>)} Parser + * @typedef {function(Node, Array<*>)} Parser */ /** - * @typedef {function(Node, *, Array.<*>)} Serializer + * @typedef {function(Node, *, Array<*>)} Serializer */ @@ -66,9 +66,9 @@ export function getAllTextContent(node, normalizeWhitespace) { * @param {Node} node Node. * @param {boolean} normalizeWhitespace Normalize whitespace: remove all line * breaks. - * @param {Array.} accumulator Accumulator. + * @param {Array} accumulator Accumulator. * @private - * @return {Array.} Accumulator. + * @return {Array} Accumulator. */ export function getAllTextContent_(node, normalizeWhitespace, accumulator) { if (node.nodeType == Node.CDATA_SECTION_NODE || @@ -131,7 +131,7 @@ export function parse(xml) { /** * Make an array extender function for extending the array at the top of the * object stack. - * @param {function(this: T, Node, Array.<*>): (Array.<*>|undefined)} valueReader Value reader. + * @param {function(this: T, Node, Array<*>): (Array<*>|undefined)} valueReader Value reader. * @param {T=} opt_this The object to use as `this` in `valueReader`. * @return {module:ol/xml~Parser} Parser. * @template T @@ -140,12 +140,12 @@ export function makeArrayExtender(valueReader, opt_this) { return ( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function(node, objectStack) { const value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack); if (value !== undefined) { - const array = /** @type {Array.<*>} */ (objectStack[objectStack.length - 1]); + const array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]); extend(array, value); } } @@ -156,7 +156,7 @@ export function makeArrayExtender(valueReader, opt_this) { /** * Make an array pusher function for pushing to the array at the top of the * object stack. - * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader. + * @param {function(this: T, Node, Array<*>): *} valueReader Value reader. * @param {T=} opt_this The object to use as `this` in `valueReader`. * @return {module:ol/xml~Parser} Parser. * @template T @@ -165,12 +165,12 @@ export function makeArrayPusher(valueReader, opt_this) { return ( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function(node, objectStack) { const value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack); if (value !== undefined) { - const array = /** @type {Array.<*>} */ (objectStack[objectStack.length - 1]); + const array = /** @type {Array<*>} */ (objectStack[objectStack.length - 1]); array.push(value); } }); @@ -180,7 +180,7 @@ export function makeArrayPusher(valueReader, opt_this) { /** * Make an object stack replacer function for replacing the object at the * top of the stack. - * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader. + * @param {function(this: T, Node, Array<*>): *} valueReader Value reader. * @param {T=} opt_this The object to use as `this` in `valueReader`. * @return {module:ol/xml~Parser} Parser. * @template T @@ -189,7 +189,7 @@ export function makeReplacer(valueReader, opt_this) { return ( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function(node, objectStack) { const value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack); @@ -203,7 +203,7 @@ export function makeReplacer(valueReader, opt_this) { /** * Make an object property pusher function for adding a property to the * object at the top of the stack. - * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader. + * @param {function(this: T, Node, Array<*>): *} valueReader Value reader. * @param {string=} opt_property Property. * @param {T=} opt_this The object to use as `this` in `valueReader`. * @return {module:ol/xml~Parser} Parser. @@ -213,7 +213,7 @@ export function makeObjectPropertyPusher(valueReader, opt_property, opt_this) { return ( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function(node, objectStack) { const value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack); @@ -234,7 +234,7 @@ export function makeObjectPropertyPusher(valueReader, opt_property, opt_this) { /** * Make an object property setter function. - * @param {function(this: T, Node, Array.<*>): *} valueReader Value reader. + * @param {function(this: T, Node, Array<*>): *} valueReader Value reader. * @param {string=} opt_property Property. * @param {T=} opt_this The object to use as `this` in `valueReader`. * @return {module:ol/xml~Parser} Parser. @@ -244,7 +244,7 @@ export function makeObjectPropertySetter(valueReader, opt_property, opt_this) { return ( /** * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. */ function(node, objectStack) { const value = valueReader.call(opt_this !== undefined ? opt_this : this, node, objectStack); @@ -261,7 +261,7 @@ export function makeObjectPropertySetter(valueReader, opt_property, opt_this) { * Create a serializer that appends nodes written by its `nodeWriter` to its * designated parent. The parent is the `node` of the * {@link module:ol/xml~NodeStackItem} at the top of the `objectStack`. - * @param {function(this: T, Node, V, Array.<*>)} nodeWriter Node writer. + * @param {function(this: T, Node, V, Array<*>)} nodeWriter Node writer. * @param {T=} opt_this The object to use as `this` in `nodeWriter`. * @return {module:ol/xml~Serializer} Serializer. * @template T, V @@ -283,7 +283,7 @@ export function makeChildAppender(nodeWriter, opt_this) { * designed to serialize a single item. An example would be a LineString * geometry writer, which could be reused for writing MultiLineString * geometries. - * @param {function(this: T, Node, V, Array.<*>)} nodeWriter Node writer. + * @param {function(this: T, Node, V, Array<*>)} nodeWriter Node writer. * @param {T=} opt_this The object to use as `this` in `nodeWriter`. * @return {module:ol/xml~Serializer} Serializer. * @template T, V @@ -314,14 +314,14 @@ export function makeArraySerializer(nodeWriter, opt_this) { * @param {string=} opt_namespaceURI Fixed namespace URI which will be used for * all created nodes. If not provided, the namespace of the parent node will * be used. - * @return {function(*, Array.<*>, string=): (Node|undefined)} Node factory. + * @return {function(*, Array<*>, string=): (Node|undefined)} Node factory. */ export function makeSimpleNodeFactory(opt_nodeName, opt_namespaceURI) { const fixedNodeName = opt_nodeName; return ( /** * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {string=} opt_nodeName Node name. * @return {Node} Node. */ @@ -345,7 +345,7 @@ export function makeSimpleNodeFactory(opt_nodeName, opt_namespaceURI) { * `nodeName` passed by {@link module:ol/xml~serialize} or * {@link module:ol/xml~pushSerializeAndPop} to the node factory. * @const - * @type {function(*, Array.<*>, string=): (Node|undefined)} + * @type {function(*, Array<*>, string=): (Node|undefined)} */ export const OBJECT_PROPERTY_NODE_FACTORY = makeSimpleNodeFactory(); @@ -356,8 +356,8 @@ export const OBJECT_PROPERTY_NODE_FACTORY = makeSimpleNodeFactory(); * `opt_key` argument. * @param {Object.} object Key-value pairs for the sequence. Keys can * be a subset of the `orderedKeys`. - * @param {Array.} orderedKeys Keys in the order of the sequence. - * @return {Array.} Values in the order of the sequence. The resulting array + * @param {Array} orderedKeys Keys in the order of the sequence. + * @return {Array} Values in the order of the sequence. The resulting array * has the same length as the `orderedKeys` array. Values that are not * present in `object` will be `undefined` in the resulting array. * @template V @@ -376,7 +376,7 @@ export function makeSequence(object, orderedKeys) { * Create a namespaced structure, using the same values for each namespace. * This can be used as a starting point for versioned parsers, when only a few * values are version specific. - * @param {Array.} namespaceURIs Namespace URIs. + * @param {Array} namespaceURIs Namespace URIs. * @param {T} structure Structure. * @param {Object.=} opt_structureNS Namespaced structure to add to. * @return {Object.} Namespaced structure. @@ -400,7 +400,7 @@ export function makeStructureNS(namespaceURIs, structure, opt_structureNS) { * @param {Object.>} parsersNS * Parsers by namespace. * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {*=} opt_this The object to use as `this`. */ export function parseNode(parsersNS, node, objectStack, opt_this) { @@ -423,7 +423,7 @@ export function parseNode(parsersNS, node, objectStack, opt_this) { * @param {Object.>} parsersNS * Parsers by namespace. * @param {Node} node Node. - * @param {Array.<*>} objectStack Object stack. + * @param {Array<*>} objectStack Object stack. * @param {*=} opt_this The object to use as `this`. * @return {T} Object. * @template T @@ -439,16 +439,16 @@ export function pushParseAndPop(object, parsersNS, node, objectStack, opt_this) * Walk through an array of `values` and call a serializer for each value. * @param {Object.>} serializersNS * Namespaced serializers. - * @param {function(this: T, *, Array.<*>, (string|undefined)): (Node|undefined)} nodeFactory + * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory * Node factory. The `nodeFactory` creates the node whose namespace and name * will be used to choose a node writer from `serializersNS`. This * separation allows us to decide what kind of node to create, depending on * the value we want to serialize. An example for this would be different * geometry writers based on the geometry type. - * @param {Array.<*>} values Values to serialize. An example would be an array + * @param {Array<*>} values Values to serialize. An example would be an array * of {@link module:ol/Feature~Feature} instances. - * @param {Array.<*>} objectStack Node stack. - * @param {Array.=} opt_keys Keys of the `values`. Will be passed to the + * @param {Array<*>} objectStack Node stack. + * @param {Array=} opt_keys Keys of the `values`. Will be passed to the * `nodeFactory`. This is used for serializing object literals where the * node name relates to the property key. The array length of `opt_keys` has * to match the length of `values`. For serializing a sequence, `opt_keys` @@ -479,16 +479,16 @@ export function serialize( * @param {O} object Object. * @param {Object.>} serializersNS * Namespaced serializers. - * @param {function(this: T, *, Array.<*>, (string|undefined)): (Node|undefined)} nodeFactory + * @param {function(this: T, *, Array<*>, (string|undefined)): (Node|undefined)} nodeFactory * Node factory. The `nodeFactory` creates the node whose namespace and name * will be used to choose a node writer from `serializersNS`. This * separation allows us to decide what kind of node to create, depending on * the value we want to serialize. An example for this would be different * geometry writers based on the geometry type. - * @param {Array.<*>} values Values to serialize. An example would be an array + * @param {Array<*>} values Values to serialize. An example would be an array * of {@link module:ol/Feature~Feature} instances. - * @param {Array.<*>} objectStack Node stack. - * @param {Array.=} opt_keys Keys of the `values`. Will be passed to the + * @param {Array<*>} objectStack Node stack. + * @param {Array=} opt_keys Keys of the `values`. Will be passed to the * `nodeFactory`. This is used for serializing object literals where the * node name relates to the property key. The array length of `opt_keys` has * to match the length of `values`. For serializing a sequence, `opt_keys` diff --git a/tasks/generate-index.js b/tasks/generate-index.js index c94638428e..b13cdaaf43 100644 --- a/tasks/generate-index.js +++ b/tasks/generate-index.js @@ -14,7 +14,7 @@ async function getSymbols() { /** * Generate a list of imports. - * @param {Array.} symbols List of symbols. + * @param {Array} symbols List of symbols. * @return {Promise} A list of imports sorted by export name. */ function getImports(symbols) { @@ -64,9 +64,9 @@ function formatSymbolExport(name, namespaces) { /** * Generate export code given a list symbol names. - * @param {Array.} symbols List of symbols. + * @param {Array} symbols List of symbols. * @param {Object.} namespaces Already defined namespaces. - * @param {Array.} imports List of all imports. + * @param {Array} imports List of all imports. * @return {string} Export code. */ function generateExports(symbols, namespaces, imports) { diff --git a/tasks/generate-info.js b/tasks/generate-info.js index 0212d3546e..8bf3fa2a61 100644 --- a/tasks/generate-info.js +++ b/tasks/generate-info.js @@ -109,7 +109,7 @@ function parseOutput(output) { /** * Spawn JSDoc. - * @param {Array.} paths Paths to source files. + * @param {Array} paths Paths to source files. * @return {Promise} Resolves with the JSDoc output (new metadata). * If provided with an empty list of paths, resolves with null. */