From 9c52e0d6d9d243a7e838106bff858ccd17b71998 Mon Sep 17 00:00:00 2001 From: Frederic Junod Date: Tue, 18 Sep 2018 13:26:10 +0200 Subject: [PATCH] Remove extra imports in jsdoc The symbols are already imported (es6 import) --- src/ol/Collection.js | 2 +- src/ol/Graticule.js | 36 ++++++++++++++--------------- src/ol/Image.js | 2 +- src/ol/ImageTile.js | 4 ++-- src/ol/Overlay.js | 10 ++++---- src/ol/VectorImageTile.js | 4 ++-- src/ol/View.js | 6 ++--- src/ol/extent.js | 4 ++-- src/ol/format/filter.js | 34 +++++++++++++-------------- src/ol/proj.js | 36 ++++++++++++++--------------- src/ol/render.js | 2 +- src/ol/render/canvas.js | 2 +- src/ol/render/canvas/Replay.js | 4 ++-- src/ol/render/canvas/ReplayGroup.js | 12 +++++----- src/ol/tilegrid.js | 14 +++++------ 15 files changed, 86 insertions(+), 86 deletions(-) diff --git a/src/ol/Collection.js b/src/ol/Collection.js index 6a7b4e5b62..00376904e7 100644 --- a/src/ol/Collection.js +++ b/src/ol/Collection.js @@ -24,7 +24,7 @@ const Property = { export class CollectionEvent extends Event { /** - * @param {import("./CollectionEventType.js").default} type Type. + * @param {CollectionEventType} type Type. * @param {*=} opt_element Element. */ constructor(type, opt_element) { diff --git a/src/ol/Graticule.js b/src/ol/Graticule.js index 3c0a229637..d1c1877c9d 100644 --- a/src/ol/Graticule.js +++ b/src/ol/Graticule.js @@ -17,7 +17,7 @@ import Text from './style/Text.js'; /** - * @type {import("./style/Stroke.js").default} + * @type {Stroke} * @private * @const */ @@ -36,7 +36,7 @@ const INTERVALS = [ /** * @typedef {Object} GraticuleLabelDataType - * @property {import("./geom/Point.js").default} geom + * @property {Point} geom * @property {string} text */ @@ -50,7 +50,7 @@ const INTERVALS = [ * appropriate for conformal projections like Spherical Mercator. If you * increase the value, more lines will be drawn and the drawing performance will * decrease. - * @property {import("./style/Stroke.js").default} [strokeStyle='rgba(0,0,0,0.2)'] The + * @property {Stroke} [strokeStyle='rgba(0,0,0,0.2)'] The * stroke style to use for drawing the graticule. If not provided, a not fully * opaque black will be used. * @property {number} [targetSize=100] The target size of the graticule cells, @@ -71,7 +71,7 @@ const INTERVALS = [ * @property {number} [latLabelPosition=1] Latitude label position in fractions * (0..1) of view extent. 0 means at the left of the viewport, 1 means at the * right. - * @property {import("./style/Text.js").default} [lonLabelStyle] Longitude label text + * @property {Text} [lonLabelStyle] Longitude label text * style. If not provided, the following style will be used: * ```js * new Text({ @@ -89,7 +89,7 @@ const INTERVALS = [ * Note that the default's `textBaseline` configuration will not work well for * `lonLabelPosition` configurations that position labels close to the top of * the viewport. - * @property {import("./style/Text.js").default} [latLabelStyle] Latitude label text style. + * @property {Text} [latLabelStyle] Latitude label text style. * If not provided, the following style will be used: * ```js * new Text({ @@ -200,19 +200,19 @@ class Graticule { this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100; /** - * @type {Array} + * @type {Array} * @private */ this.meridians_ = []; /** - * @type {Array} + * @type {Array} * @private */ this.parallels_ = []; /** - * @type {import("./style/Stroke.js").default} + * @type {Stroke} * @private */ this.strokeStyle_ = options.strokeStyle !== undefined ? options.strokeStyle : DEFAULT_STROKE_STYLE; @@ -282,7 +282,7 @@ class Graticule { options.latLabelPosition; /** - * @type {import("./style/Text.js").default} + * @type {Text} * @private */ this.lonLabelStyle_ = options.lonLabelStyle !== undefined ? options.lonLabelStyle : @@ -299,7 +299,7 @@ class Graticule { }); /** - * @type {import("./style/Text.js").default} + * @type {Text} * @private */ this.latLabelStyle_ = options.latLabelStyle !== undefined ? options.latLabelStyle : @@ -348,10 +348,10 @@ class Graticule { } /** - * @param {import("./geom/LineString.js").default} lineString Meridian + * @param {LineString} lineString Meridian * @param {import("./extent.js").Extent} extent Extent. * @param {number} index Index. - * @return {import("./geom/Point.js").default} Meridian point. + * @return {Point} Meridian point. * @private */ getMeridianPoint_(lineString, extent, index) { @@ -398,10 +398,10 @@ class Graticule { } /** - * @param {import("./geom/LineString.js").default} lineString Parallels. + * @param {LineString} lineString Parallels. * @param {import("./extent.js").Extent} extent Extent. * @param {number} index Index. - * @return {import("./geom/Point.js").default} Parallel point. + * @return {Point} Parallel point. * @private */ getParallelPoint_(lineString, extent, index) { @@ -561,7 +561,7 @@ class Graticule { * @param {number} minLat Minimal latitude. * @param {number} maxLat Maximal latitude. * @param {number} squaredTolerance Squared tolerance. - * @return {import("./geom/LineString.js").default} The meridian line string. + * @return {LineString} The meridian line string. * @param {number} index Index. * @private */ @@ -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() { @@ -591,7 +591,7 @@ class Graticule { * @param {number} minLon Minimal longitude. * @param {number} maxLon Maximal longitude. * @param {number} squaredTolerance Squared tolerance. - * @return {import("./geom/LineString.js").default} The parallel line string. + * @return {LineString} The parallel line string. * @param {number} index Index. * @private */ @@ -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 f308a6dc8d..4bca08ee31 100644 --- a/src/ol/Image.js +++ b/src/ol/Image.js @@ -64,7 +64,7 @@ class ImageWrapper extends ImageBase { /** * @protected - * @type {import("./ImageState.js").default} + * @type {ImageState} */ this.state = ImageState.IDLE; diff --git a/src/ol/ImageTile.js b/src/ol/ImageTile.js index a07219c95e..dcf604787c 100644 --- a/src/ol/ImageTile.js +++ b/src/ol/ImageTile.js @@ -9,7 +9,7 @@ import EventType from './events/EventType.js'; /** * @typedef {function(new: ImageTile, import("./tilecoord.js").TileCoord, - * import("./TileState.js").default, string, ?string, import("./Tile.js").LoadFunction)} TileClass + * TileState, string, ?string, import("./Tile.js").LoadFunction)} TileClass * @api */ @@ -17,7 +17,7 @@ class ImageTile extends Tile { /** * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. - * @param {import("./TileState.js").default} state State. + * @param {TileState} state State. * @param {string} src Image source URI. * @param {?string} crossOrigin Cross origin. * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function. diff --git a/src/ol/Overlay.js b/src/ol/Overlay.js index 42843bbb86..0cca0e72a8 100644 --- a/src/ol/Overlay.js +++ b/src/ol/Overlay.js @@ -22,7 +22,7 @@ import {containsExtent} from './extent.js'; * shifts the overlay down. * @property {import("./coordinate.js").Coordinate} [position] The overlay position * in map projection. - * @property {import("./OverlayPositioning.js").default} [positioning='top-left'] Defines how + * @property {OverlayPositioning} [positioning='top-left'] Defines how * the overlay is actually positioned with respect to its `position` property. * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`, * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`, @@ -205,7 +205,7 @@ class Overlay extends BaseObject { this.setOffset(options.offset !== undefined ? options.offset : [0, 0]); this.setPositioning(options.positioning !== undefined ? - /** @type {import("./OverlayPositioning.js").default} */ (options.positioning) : + /** @type {OverlayPositioning} */ (options.positioning) : OverlayPositioning.TOP_LEFT); if (options.position !== undefined) { @@ -271,14 +271,14 @@ class Overlay extends BaseObject { /** * Get the current positioning of this overlay. - * @return {import("./OverlayPositioning.js").default} How the overlay is positioned + * @return {OverlayPositioning} How the overlay is positioned * relative to its point on the map. * @observable * @api */ getPositioning() { return ( - /** @type {import("./OverlayPositioning.js").default} */ (this.get(Property.POSITIONING)) + /** @type {OverlayPositioning} */ (this.get(Property.POSITIONING)) ); } @@ -469,7 +469,7 @@ class Overlay extends BaseObject { /** * Set the positioning for this overlay. - * @param {import("./OverlayPositioning.js").default} positioning how the overlay is + * @param {OverlayPositioning} positioning how the overlay is * positioned relative to its point on the map. * @observable * @api diff --git a/src/ol/VectorImageTile.js b/src/ol/VectorImageTile.js index 523b0b966b..7f7ca67ddd 100644 --- a/src/ol/VectorImageTile.js +++ b/src/ol/VectorImageTile.js @@ -25,7 +25,7 @@ class VectorImageTile extends Tile { /** * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. - * @param {import("./TileState.js").default} state State. + * @param {TileState} state State. * @param {number} sourceRevision Source revision. * @param {import("./format/Feature.js").default} format Feature format. * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function. @@ -36,7 +36,7 @@ class VectorImageTile extends Tile { * @param {Object} sourceTiles Source tiles. * @param {number} pixelRatio Pixel ratio. * @param {import("./proj/Projection.js").default} projection Projection. - * @param {function(new: import("./VectorTile.js").default, import("./tilecoord.js").TileCoord, import("./TileState.js").default, string, + * @param {function(new: import("./VectorTile.js").default, import("./tilecoord.js").TileCoord, TileState, string, * import("./format/Feature.js").default, import("./Tile.js").LoadFunction)} tileClass Class to * instantiate for source tiles. * @param {function(this: import("./source/VectorTile.js").default, import("./events/Event.js").default)} handleTileChange diff --git a/src/ol/View.js b/src/ol/View.js index 8223244017..eb6b1a98a9 100644 --- a/src/ol/View.js +++ b/src/ol/View.js @@ -974,7 +974,7 @@ class View extends BaseObject { * The size is pixel dimensions of the box to fit the extent into. * In most cases you will want to use the map size, that is `map.getSize()`. * Takes care of the map angle. - * @param {import("./geom/SimpleGeometry.js").default|import("./extent.js").Extent} geometryOrExtent The geometry or + * @param {SimpleGeometry|import("./extent.js").Extent} geometryOrExtent The geometry or * extent to fit the view to. * @param {FitOptions=} opt_options Options. * @api @@ -985,7 +985,7 @@ class View extends BaseObject { if (!size) { size = this.getSizeFromViewport_(); } - /** @type {import("./geom/SimpleGeometry.js").default} */ + /** @type {SimpleGeometry} */ let geometry; if (!(geometryOrExtent instanceof SimpleGeometry)) { assert(Array.isArray(geometryOrExtent), @@ -1135,7 +1135,7 @@ class View extends BaseObject { } /** - * @param {import("./ViewHint.js").default} hint Hint. + * @param {ViewHint} hint Hint. * @param {number} delta Delta. * @return {number} New value. */ diff --git a/src/ol/extent.js b/src/ol/extent.js index f7c154689c..1ae333ba3c 100644 --- a/src/ol/extent.js +++ b/src/ol/extent.js @@ -165,7 +165,7 @@ export function containsXY(extent, x, y) { * Get the relationship between a coordinate and extent. * @param {Extent} extent The extent. * @param {import("./coordinate.js").Coordinate} coordinate The coordinate. - * @return {import("./extent/Relationship.js").default} The relationship (bitwise compare with + * @return {Relationship} The relationship (bitwise compare with * import("./extent/Relationship.js").Relationship). */ export function coordinateRelationship(extent, coordinate) { @@ -478,7 +478,7 @@ export function getCenter(extent) { /** * Get a corner coordinate of an extent. * @param {Extent} extent Extent. - * @param {import("./extent/Corner.js").default} corner Corner. + * @param {Corner} corner Corner. * @return {import("./coordinate.js").Coordinate} Corner coordinate. */ export function getCorner(extent, corner) { diff --git a/src/ol/format/filter.js b/src/ol/format/filter.js index b307723dbc..9bf251cd43 100644 --- a/src/ol/format/filter.js +++ b/src/ol/format/filter.js @@ -24,7 +24,7 @@ import Within from '../format/filter/Within.js'; * Create a logical `` operator between two or more filter conditions. * * @param {...import("./filter/Filter.js").default} conditions Filter conditions. - * @returns {!import("./filter/And.js").default} `` operator. + * @returns {!And} `` operator. * @api */ export function and(conditions) { @@ -37,7 +37,7 @@ export function and(conditions) { * Create a logical `` operator between two or more filter conditions. * * @param {...import("./filter/Filter.js").default} conditions Filter conditions. - * @returns {!import("./filter/Or.js").default} `` operator. + * @returns {!Or} `` operator. * @api */ export function or(conditions) { @@ -50,7 +50,7 @@ export function or(conditions) { * Represents a logical `` operator for a filter condition. * * @param {!import("./filter/Filter.js").default} condition Filter condition. - * @returns {!import("./filter/Not.js").default} `` operator. + * @returns {!Not} `` operator. * @api */ export function not(condition) { @@ -66,7 +66,7 @@ export function not(condition) { * @param {!import("../extent.js").Extent} extent Extent. * @param {string=} opt_srsName SRS name. No srsName attribute will be * set on geometries when this is not provided. - * @returns {!import("./filter/Bbox.js").default} `` operator. + * @returns {!Bbox} `` operator. * @api */ export function bbox(geometryName, extent, opt_srsName) { @@ -81,7 +81,7 @@ export function bbox(geometryName, extent, opt_srsName) { * @param {!import("../geom/Geometry.js").default} geometry Geometry. * @param {string=} opt_srsName SRS name. No srsName attribute will be * set on geometries when this is not provided. - * @returns {!import("./filter/Contains.js").default} `` operator. + * @returns {!Contains} `` operator. * @api */ export function contains(geometryName, geometry, opt_srsName) { @@ -96,7 +96,7 @@ export function contains(geometryName, geometry, opt_srsName) { * @param {!import("../geom/Geometry.js").default} geometry Geometry. * @param {string=} opt_srsName SRS name. No srsName attribute will be * set on geometries when this is not provided. - * @returns {!import("./filter/Intersects.js").default} `` operator. + * @returns {!Intersects} `` operator. * @api */ export function intersects(geometryName, geometry, opt_srsName) { @@ -111,7 +111,7 @@ export function intersects(geometryName, geometry, opt_srsName) { * @param {!import("../geom/Geometry.js").default} geometry Geometry. * @param {string=} opt_srsName SRS name. No srsName attribute will be * set on geometries when this is not provided. - * @returns {!import("./filter/Within.js").default} `` operator. + * @returns {!Within} `` operator. * @api */ export function within(geometryName, geometry, opt_srsName) { @@ -125,7 +125,7 @@ export function within(geometryName, geometry, opt_srsName) { * @param {!string} propertyName Name of the context property to compare. * @param {!(string|number)} expression The value to compare. * @param {boolean=} opt_matchCase Case-sensitive? - * @returns {!import("./filter/EqualTo.js").default} `` operator. + * @returns {!EqualTo} `` operator. * @api */ export function equalTo(propertyName, expression, opt_matchCase) { @@ -139,7 +139,7 @@ export function equalTo(propertyName, expression, opt_matchCase) { * @param {!string} propertyName Name of the context property to compare. * @param {!(string|number)} expression The value to compare. * @param {boolean=} opt_matchCase Case-sensitive? - * @returns {!import("./filter/NotEqualTo.js").default} `` operator. + * @returns {!NotEqualTo} `` operator. * @api */ export function notEqualTo(propertyName, expression, opt_matchCase) { @@ -152,7 +152,7 @@ export function notEqualTo(propertyName, expression, opt_matchCase) { * * @param {!string} propertyName Name of the context property to compare. * @param {!number} expression The value to compare. - * @returns {!import("./filter/LessThan.js").default} `` operator. + * @returns {!LessThan} `` operator. * @api */ export function lessThan(propertyName, expression) { @@ -165,7 +165,7 @@ export function lessThan(propertyName, expression) { * * @param {!string} propertyName Name of the context property to compare. * @param {!number} expression The value to compare. - * @returns {!import("./filter/LessThanOrEqualTo.js").default} `` operator. + * @returns {!LessThanOrEqualTo} `` operator. * @api */ export function lessThanOrEqualTo(propertyName, expression) { @@ -178,7 +178,7 @@ export function lessThanOrEqualTo(propertyName, expression) { * * @param {!string} propertyName Name of the context property to compare. * @param {!number} expression The value to compare. - * @returns {!import("./filter/GreaterThan.js").default} `` operator. + * @returns {!GreaterThan} `` operator. * @api */ export function greaterThan(propertyName, expression) { @@ -191,7 +191,7 @@ export function greaterThan(propertyName, expression) { * * @param {!string} propertyName Name of the context property to compare. * @param {!number} expression The value to compare. - * @returns {!import("./filter/GreaterThanOrEqualTo.js").default} `` operator. + * @returns {!GreaterThanOrEqualTo} `` operator. * @api */ export function greaterThanOrEqualTo(propertyName, expression) { @@ -204,7 +204,7 @@ export function greaterThanOrEqualTo(propertyName, expression) { * is null. * * @param {!string} propertyName Name of the context property to compare. - * @returns {!import("./filter/IsNull.js").default} `` operator. + * @returns {!IsNull} `` operator. * @api */ export function isNull(propertyName) { @@ -219,7 +219,7 @@ export function isNull(propertyName) { * @param {!string} propertyName Name of the context property to compare. * @param {!number} lowerBoundary The lower bound of the range. * @param {!number} upperBoundary The upper bound of the range. - * @returns {!import("./filter/IsBetween.js").default} `` operator. + * @returns {!IsBetween} `` operator. * @api */ export function between(propertyName, lowerBoundary, upperBoundary) { @@ -240,7 +240,7 @@ export function between(propertyName, lowerBoundary, upperBoundary) { * @param {string=} opt_escapeChar Escape character which can be used to escape * the pattern characters. Default is '!'. * @param {boolean=} opt_matchCase Case-sensitive? - * @returns {!import("./filter/IsLike.js").default} `` operator. + * @returns {!IsLike} `` operator. * @api */ export function like(propertyName, pattern, @@ -256,7 +256,7 @@ export function like(propertyName, pattern, * @param {!string} propertyName Name of the context property to compare. * @param {!string} begin The begin date in ISO-8601 format. * @param {!string} end The end date in ISO-8601 format. - * @returns {!import("./filter/During.js").default} `` operator. + * @returns {!During} `` operator. * @api */ export function during(propertyName, begin, end) { diff --git a/src/ol/proj.js b/src/ol/proj.js index 6b621009fb..f933af175f 100644 --- a/src/ol/proj.js +++ b/src/ol/proj.js @@ -67,7 +67,7 @@ import {add as addTransformFunc, clear as clearTransformFuncs, get as getTransfo /** * A projection as {@link module:ol/proj/Projection}, SRS identifier * string or undefined. - * @typedef {import("./proj/Projection.js").default|string|undefined} ProjectionLike + * @typedef {Projection|string|undefined} ProjectionLike * @api */ @@ -129,7 +129,7 @@ export function identityTransform(input, opt_output, opt_dimension) { * Add a Projection object to the list of supported projections that can be * looked up by their code. * - * @param {import("./proj/Projection.js").default} projection Projection instance. + * @param {Projection} projection Projection instance. * @api */ export function addProjection(projection) { @@ -139,7 +139,7 @@ export function addProjection(projection) { /** - * @param {Array} projections Projections. + * @param {Array} projections Projections. */ export function addProjections(projections) { projections.forEach(addProjection); @@ -152,13 +152,13 @@ export function addProjections(projections) { * @param {ProjectionLike} projectionLike Either a code string which is * a combination of authority and identifier such as "EPSG:4326", or an * existing projection object, or undefined. - * @return {import("./proj/Projection.js").default} Projection object, or null if not in list. + * @return {Projection} Projection object, or null if not in list. * @api */ export function get(projectionLike) { return typeof projectionLike === 'string' ? projections.get(/** @type {string} */ (projectionLike)) : - (/** @type {import("./proj/Projection.js").default} */ (projectionLike) || null); + (/** @type {Projection} */ (projectionLike) || null); } @@ -177,7 +177,7 @@ export function get(projectionLike) { * @param {ProjectionLike} projection The projection. * @param {number} resolution Nominal resolution in projection units. * @param {import("./coordinate.js").Coordinate} point Point to find adjusted resolution at. - * @param {import("./proj/Units.js").default=} opt_units Units to get the point resolution in. + * @param {Units=} opt_units Units to get the point resolution in. * Default is the projection's units. * @return {number} Point resolution. * @api @@ -223,7 +223,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) { @@ -242,9 +242,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 {TransformFunction} forwardTransform Transformation from any * projection in projection1 to any projection in projection2. @@ -271,9 +271,9 @@ export function clearAllProjections() { /** - * @param {import("./proj/Projection.js").default|string|undefined} projection Projection. + * @param {Projection|string|undefined} projection Projection. * @param {string} defaultCode Default code. - * @return {import("./proj/Projection.js").default} Projection. + * @return {Projection} Projection. */ export function createProjection(projection, defaultCode) { if (!projection) { @@ -282,7 +282,7 @@ export function createProjection(projection, defaultCode) { return get(projection); } else { return ( - /** @type {import("./proj/Projection.js").default} */ (projection) + /** @type {Projection} */ (projection) ); } } @@ -387,8 +387,8 @@ export function toLonLat(coordinate, opt_projection) { * projection does represent the same geographic point as the same coordinate in * the other projection. * - * @param {import("./proj/Projection.js").default} projection1 Projection 1. - * @param {import("./proj/Projection.js").default} projection2 Projection 2. + * @param {Projection} projection1 Projection 1. + * @param {Projection} projection2 Projection 2. * @return {boolean} Equivalent. * @api */ @@ -410,8 +410,8 @@ export function equivalent(projection1, projection2) { * Searches in the list of transform functions for the function for converting * coordinates from the source projection to the destination projection. * - * @param {import("./proj/Projection.js").default} sourceProjection Source Projection object. - * @param {import("./proj/Projection.js").default} destinationProjection Destination Projection + * @param {Projection} sourceProjection Source Projection object. + * @param {Projection} destinationProjection Destination Projection * object. * @return {TransformFunction} Transform function. */ @@ -483,8 +483,8 @@ export function transformExtent(extent, source, destination) { * Transforms the given point to the destination projection. * * @param {import("./coordinate.js").Coordinate} point Point. - * @param {import("./proj/Projection.js").default} sourceProjection Source projection. - * @param {import("./proj/Projection.js").default} destinationProjection Destination projection. + * @param {Projection} sourceProjection Source projection. + * @param {Projection} destinationProjection Destination projection. * @return {import("./coordinate.js").Coordinate} Point. */ export function transformWithProjections(point, sourceProjection, destinationProjection) { diff --git a/src/ol/render.js b/src/ol/render.js index ecf21e59b3..927b46df76 100644 --- a/src/ol/render.js +++ b/src/ol/render.js @@ -60,7 +60,7 @@ import CanvasImmediateRenderer from './render/canvas/Immediate.js'; * * @param {CanvasRenderingContext2D} context Canvas context. * @param {ToContextOptions=} opt_options Options. - * @return {import("./render/canvas/Immediate.js").default} Canvas Immediate. + * @return {CanvasImmediateRenderer} Canvas Immediate. * @api */ export function toContext(context, opt_options) { diff --git a/src/ol/render/canvas.js b/src/ol/render/canvas.js index 363e13f08c..f338e47d7f 100644 --- a/src/ol/render/canvas.js +++ b/src/ol/render/canvas.js @@ -163,7 +163,7 @@ export const defaultLineWidth = 1; /** * The label cache for text rendering. To change the default cache size of 2048 * entries, use {@link module:ol/structs/LRUCache#setSize}. - * @type {import("../structs/LRUCache.js").default} + * @type {LRUCache} * @api */ export const labelCache = new LRUCache(); diff --git a/src/ol/render/canvas/Replay.js b/src/ol/render/canvas/Replay.js index d50cfd735d..f991d613e9 100644 --- a/src/ol/render/canvas/Replay.js +++ b/src/ol/render/canvas/Replay.js @@ -589,7 +589,7 @@ class CanvasReplay extends VectorContext { let x, y; while (i < ii) { const instruction = instructions[i]; - const type = /** @type {import("./Instruction.js").default} */ (instruction[0]); + const type = /** @type {CanvasInstruction} */ (instruction[0]); switch (type) { case CanvasInstruction.BEGIN_GEOMETRY: feature = /** @type {import("../../Feature.js").default|import("../Feature.js").default} */ (instruction[1]); @@ -903,7 +903,7 @@ class CanvasReplay extends VectorContext { let begin = -1; for (i = 0; i < n; ++i) { instruction = hitDetectionInstructions[i]; - type = /** @type {import("./Instruction.js").default} */ (instruction[0]); + type = /** @type {CanvasInstruction} */ (instruction[0]); if (type == CanvasInstruction.END_GEOMETRY) { begin = i; } else if (type == CanvasInstruction.BEGIN_GEOMETRY) { diff --git a/src/ol/render/canvas/ReplayGroup.js b/src/ol/render/canvas/ReplayGroup.js index 2487690681..f70803843d 100644 --- a/src/ol/render/canvas/ReplayGroup.js +++ b/src/ol/render/canvas/ReplayGroup.js @@ -19,8 +19,8 @@ import {create as createTransform, compose as composeTransform} from '../../tran /** - * @type {Object)>} */ const BATCH_CONSTRUCTORS = { @@ -104,7 +104,7 @@ class CanvasReplayGroup extends ReplayGroup { /** * @private - * @type {!Object>} + * @type {!Object>} */ this.replaysByZIndex_ = {}; @@ -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) { @@ -335,7 +335,7 @@ class CanvasReplayGroup extends ReplayGroup { } /** - * @return {Object>} Replays. + * @return {Object>} Replays. */ getReplays() { return this.replaysByZIndex_; @@ -354,7 +354,7 @@ class CanvasReplayGroup extends ReplayGroup { * @param {number} viewRotation View rotation. * @param {Object} skippedFeaturesHash Ids of features to skip. * @param {boolean} snapToPixel Snap point symbols and test to integer pixel. - * @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. */ diff --git a/src/ol/tilegrid.js b/src/ol/tilegrid.js index e9e2c9ef74..68786a3c1d 100644 --- a/src/ol/tilegrid.js +++ b/src/ol/tilegrid.js @@ -12,7 +12,7 @@ import TileGrid from './tilegrid/TileGrid.js'; /** * @param {import("./proj/Projection.js").default} projection Projection. - * @return {!import("./tilegrid/TileGrid.js").default} Default tile grid for the + * @return {!TileGrid} Default tile grid for the * passed projection. */ export function getForProjection(projection) { @@ -26,7 +26,7 @@ export function getForProjection(projection) { /** - * @param {import("./tilegrid/TileGrid.js").default} tileGrid Tile grid. + * @param {TileGrid} tileGrid Tile grid. * @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. * @param {import("./proj/Projection.js").default} projection Projection. * @return {import("./tilecoord.js").TileCoord} Tile coordinate. @@ -52,8 +52,8 @@ export function wrapX(tileGrid, tileCoord, projection) { * DEFAULT_MAX_ZOOM). * @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses * DEFAULT_TILE_SIZE). - * @param {import("./extent/Corner.js").default=} opt_corner Extent corner (default is `'top-left'`). - * @return {!import("./tilegrid/TileGrid.js").default} TileGrid instance. + * @param {Corner=} opt_corner Extent corner (default is `'top-left'`). + * @return {!TileGrid} TileGrid instance. */ export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) { const corner = opt_corner !== undefined ? opt_corner : Corner.TOP_LEFT; @@ -84,7 +84,7 @@ export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) { /** * Creates a tile grid with a standard XYZ tiling scheme. * @param {XYZOptions=} opt_options Tile grid options. - * @return {!import("./tilegrid/TileGrid.js").default} Tile grid instance. + * @return {!TileGrid} Tile grid instance. * @api */ export function createXYZ(opt_options) { @@ -144,8 +144,8 @@ function resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize) { * DEFAULT_MAX_ZOOM). * @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses * DEFAULT_TILE_SIZE). - * @param {import("./extent/Corner.js").default=} opt_corner Extent corner (default is `'top-left'`). - * @return {!import("./tilegrid/TileGrid.js").default} TileGrid instance. + * @param {Corner=} opt_corner Extent corner (default is `'top-left'`). + * @return {!TileGrid} TileGrid instance. */ export function createForProjection(projection, opt_maxZoom, opt_tileSize, opt_corner) { const extent = extentFromProjection(projection);