Remove extra imports in jsdoc

The symbols are already imported (es6 import)
This commit is contained in:
Frederic Junod
2018-09-18 13:26:10 +02:00
parent 23be1ac56d
commit 9c52e0d6d9
15 changed files with 86 additions and 86 deletions

View File

@@ -24,7 +24,7 @@ const Property = {
export class CollectionEvent extends Event { export class CollectionEvent extends Event {
/** /**
* @param {import("./CollectionEventType.js").default} type Type. * @param {CollectionEventType} type Type.
* @param {*=} opt_element Element. * @param {*=} opt_element Element.
*/ */
constructor(type, opt_element) { constructor(type, opt_element) {

View File

@@ -17,7 +17,7 @@ import Text from './style/Text.js';
/** /**
* @type {import("./style/Stroke.js").default} * @type {Stroke}
* @private * @private
* @const * @const
*/ */
@@ -36,7 +36,7 @@ const INTERVALS = [
/** /**
* @typedef {Object} GraticuleLabelDataType * @typedef {Object} GraticuleLabelDataType
* @property {import("./geom/Point.js").default} geom * @property {Point} geom
* @property {string} text * @property {string} text
*/ */
@@ -50,7 +50,7 @@ const INTERVALS = [
* appropriate for conformal projections like Spherical Mercator. If you * appropriate for conformal projections like Spherical Mercator. If you
* increase the value, more lines will be drawn and the drawing performance will * increase the value, more lines will be drawn and the drawing performance will
* decrease. * 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 * stroke style to use for drawing the graticule. If not provided, a not fully
* opaque black will be used. * opaque black will be used.
* @property {number} [targetSize=100] The target size of the graticule cells, * @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 * @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 * (0..1) of view extent. 0 means at the left of the viewport, 1 means at the
* right. * 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: * style. If not provided, the following style will be used:
* ```js * ```js
* new Text({ * new Text({
@@ -89,7 +89,7 @@ const INTERVALS = [
* Note that the default's `textBaseline` configuration will not work well for * Note that the default's `textBaseline` configuration will not work well for
* `lonLabelPosition` configurations that position labels close to the top of * `lonLabelPosition` configurations that position labels close to the top of
* the viewport. * 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: * If not provided, the following style will be used:
* ```js * ```js
* new Text({ * new Text({
@@ -200,19 +200,19 @@ class Graticule {
this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100; this.maxLines_ = options.maxLines !== undefined ? options.maxLines : 100;
/** /**
* @type {Array<import("./geom/LineString.js").default>} * @type {Array<LineString>}
* @private * @private
*/ */
this.meridians_ = []; this.meridians_ = [];
/** /**
* @type {Array<import("./geom/LineString.js").default>} * @type {Array<LineString>}
* @private * @private
*/ */
this.parallels_ = []; this.parallels_ = [];
/** /**
* @type {import("./style/Stroke.js").default} * @type {Stroke}
* @private * @private
*/ */
this.strokeStyle_ = options.strokeStyle !== undefined ? options.strokeStyle : DEFAULT_STROKE_STYLE; this.strokeStyle_ = options.strokeStyle !== undefined ? options.strokeStyle : DEFAULT_STROKE_STYLE;
@@ -282,7 +282,7 @@ class Graticule {
options.latLabelPosition; options.latLabelPosition;
/** /**
* @type {import("./style/Text.js").default} * @type {Text}
* @private * @private
*/ */
this.lonLabelStyle_ = options.lonLabelStyle !== undefined ? options.lonLabelStyle : this.lonLabelStyle_ = options.lonLabelStyle !== undefined ? options.lonLabelStyle :
@@ -299,7 +299,7 @@ class Graticule {
}); });
/** /**
* @type {import("./style/Text.js").default} * @type {Text}
* @private * @private
*/ */
this.latLabelStyle_ = options.latLabelStyle !== undefined ? options.latLabelStyle : 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 {import("./extent.js").Extent} extent Extent.
* @param {number} index Index. * @param {number} index Index.
* @return {import("./geom/Point.js").default} Meridian point. * @return {Point} Meridian point.
* @private * @private
*/ */
getMeridianPoint_(lineString, extent, index) { 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 {import("./extent.js").Extent} extent Extent.
* @param {number} index Index. * @param {number} index Index.
* @return {import("./geom/Point.js").default} Parallel point. * @return {Point} Parallel point.
* @private * @private
*/ */
getParallelPoint_(lineString, extent, index) { getParallelPoint_(lineString, extent, index) {
@@ -561,7 +561,7 @@ class Graticule {
* @param {number} minLat Minimal latitude. * @param {number} minLat Minimal latitude.
* @param {number} maxLat Maximal latitude. * @param {number} maxLat Maximal latitude.
* @param {number} squaredTolerance Squared tolerance. * @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. * @param {number} index Index.
* @private * @private
*/ */
@@ -579,7 +579,7 @@ class Graticule {
/** /**
* Get the list of meridians. Meridians are lines of equal longitude. * Get the list of meridians. Meridians are lines of equal longitude.
* @return {Array<import("./geom/LineString.js").default>} The meridians. * @return {Array<LineString>} The meridians.
* @api * @api
*/ */
getMeridians() { getMeridians() {
@@ -591,7 +591,7 @@ class Graticule {
* @param {number} minLon Minimal longitude. * @param {number} minLon Minimal longitude.
* @param {number} maxLon Maximal longitude. * @param {number} maxLon Maximal longitude.
* @param {number} squaredTolerance Squared tolerance. * @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. * @param {number} index Index.
* @private * @private
*/ */
@@ -609,7 +609,7 @@ class Graticule {
/** /**
* Get the list of parallels. Parallels are lines of equal latitude. * Get the list of parallels. Parallels are lines of equal latitude.
* @return {Array<import("./geom/LineString.js").default>} The parallels. * @return {Array<LineString>} The parallels.
* @api * @api
*/ */
getParallels() { getParallels() {

View File

@@ -64,7 +64,7 @@ class ImageWrapper extends ImageBase {
/** /**
* @protected * @protected
* @type {import("./ImageState.js").default} * @type {ImageState}
*/ */
this.state = ImageState.IDLE; this.state = ImageState.IDLE;

View File

@@ -9,7 +9,7 @@ import EventType from './events/EventType.js';
/** /**
* @typedef {function(new: ImageTile, import("./tilecoord.js").TileCoord, * @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 * @api
*/ */
@@ -17,7 +17,7 @@ class ImageTile extends Tile {
/** /**
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. * @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} src Image source URI.
* @param {?string} crossOrigin Cross origin. * @param {?string} crossOrigin Cross origin.
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function. * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.

View File

@@ -22,7 +22,7 @@ import {containsExtent} from './extent.js';
* shifts the overlay down. * shifts the overlay down.
* @property {import("./coordinate.js").Coordinate} [position] The overlay position * @property {import("./coordinate.js").Coordinate} [position] The overlay position
* in map projection. * 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. * the overlay is actually positioned with respect to its `position` property.
* Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`, * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,
* `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`, * `'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.setOffset(options.offset !== undefined ? options.offset : [0, 0]);
this.setPositioning(options.positioning !== undefined ? this.setPositioning(options.positioning !== undefined ?
/** @type {import("./OverlayPositioning.js").default} */ (options.positioning) : /** @type {OverlayPositioning} */ (options.positioning) :
OverlayPositioning.TOP_LEFT); OverlayPositioning.TOP_LEFT);
if (options.position !== undefined) { if (options.position !== undefined) {
@@ -271,14 +271,14 @@ class Overlay extends BaseObject {
/** /**
* Get the current positioning of this overlay. * 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. * relative to its point on the map.
* @observable * @observable
* @api * @api
*/ */
getPositioning() { getPositioning() {
return ( 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. * 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. * positioned relative to its point on the map.
* @observable * @observable
* @api * @api

View File

@@ -25,7 +25,7 @@ class VectorImageTile extends Tile {
/** /**
* @param {import("./tilecoord.js").TileCoord} tileCoord Tile coordinate. * @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 {number} sourceRevision Source revision.
* @param {import("./format/Feature.js").default} format Feature format. * @param {import("./format/Feature.js").default} format Feature format.
* @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function. * @param {import("./Tile.js").LoadFunction} tileLoadFunction Tile load function.
@@ -36,7 +36,7 @@ class VectorImageTile extends Tile {
* @param {Object<string, import("./VectorTile.js").default>} sourceTiles Source tiles. * @param {Object<string, import("./VectorTile.js").default>} sourceTiles Source tiles.
* @param {number} pixelRatio Pixel ratio. * @param {number} pixelRatio Pixel ratio.
* @param {import("./proj/Projection.js").default} projection Projection. * @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 * import("./format/Feature.js").default, import("./Tile.js").LoadFunction)} tileClass Class to
* instantiate for source tiles. * instantiate for source tiles.
* @param {function(this: import("./source/VectorTile.js").default, import("./events/Event.js").default)} handleTileChange * @param {function(this: import("./source/VectorTile.js").default, import("./events/Event.js").default)} handleTileChange

View File

@@ -974,7 +974,7 @@ class View extends BaseObject {
* The size is pixel dimensions of the box to fit the extent into. * 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()`. * In most cases you will want to use the map size, that is `map.getSize()`.
* Takes care of the map angle. * 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. * extent to fit the view to.
* @param {FitOptions=} opt_options Options. * @param {FitOptions=} opt_options Options.
* @api * @api
@@ -985,7 +985,7 @@ class View extends BaseObject {
if (!size) { if (!size) {
size = this.getSizeFromViewport_(); size = this.getSizeFromViewport_();
} }
/** @type {import("./geom/SimpleGeometry.js").default} */ /** @type {SimpleGeometry} */
let geometry; let geometry;
if (!(geometryOrExtent instanceof SimpleGeometry)) { if (!(geometryOrExtent instanceof SimpleGeometry)) {
assert(Array.isArray(geometryOrExtent), 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. * @param {number} delta Delta.
* @return {number} New value. * @return {number} New value.
*/ */

View File

@@ -165,7 +165,7 @@ export function containsXY(extent, x, y) {
* Get the relationship between a coordinate and extent. * Get the relationship between a coordinate and extent.
* @param {Extent} extent The extent. * @param {Extent} extent The extent.
* @param {import("./coordinate.js").Coordinate} coordinate The coordinate. * @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). * import("./extent/Relationship.js").Relationship).
*/ */
export function coordinateRelationship(extent, coordinate) { export function coordinateRelationship(extent, coordinate) {
@@ -478,7 +478,7 @@ export function getCenter(extent) {
/** /**
* Get a corner coordinate of an extent. * Get a corner coordinate of an extent.
* @param {Extent} extent Extent. * @param {Extent} extent Extent.
* @param {import("./extent/Corner.js").default} corner Corner. * @param {Corner} corner Corner.
* @return {import("./coordinate.js").Coordinate} Corner coordinate. * @return {import("./coordinate.js").Coordinate} Corner coordinate.
*/ */
export function getCorner(extent, corner) { export function getCorner(extent, corner) {

View File

@@ -24,7 +24,7 @@ import Within from '../format/filter/Within.js';
* Create a logical `<And>` operator between two or more filter conditions. * Create a logical `<And>` operator between two or more filter conditions.
* *
* @param {...import("./filter/Filter.js").default} conditions Filter conditions. * @param {...import("./filter/Filter.js").default} conditions Filter conditions.
* @returns {!import("./filter/And.js").default} `<And>` operator. * @returns {!And} `<And>` operator.
* @api * @api
*/ */
export function and(conditions) { export function and(conditions) {
@@ -37,7 +37,7 @@ export function and(conditions) {
* Create a logical `<Or>` operator between two or more filter conditions. * Create a logical `<Or>` operator between two or more filter conditions.
* *
* @param {...import("./filter/Filter.js").default} conditions Filter conditions. * @param {...import("./filter/Filter.js").default} conditions Filter conditions.
* @returns {!import("./filter/Or.js").default} `<Or>` operator. * @returns {!Or} `<Or>` operator.
* @api * @api
*/ */
export function or(conditions) { export function or(conditions) {
@@ -50,7 +50,7 @@ export function or(conditions) {
* Represents a logical `<Not>` operator for a filter condition. * Represents a logical `<Not>` operator for a filter condition.
* *
* @param {!import("./filter/Filter.js").default} condition Filter condition. * @param {!import("./filter/Filter.js").default} condition Filter condition.
* @returns {!import("./filter/Not.js").default} `<Not>` operator. * @returns {!Not} `<Not>` operator.
* @api * @api
*/ */
export function not(condition) { export function not(condition) {
@@ -66,7 +66,7 @@ export function not(condition) {
* @param {!import("../extent.js").Extent} extent Extent. * @param {!import("../extent.js").Extent} extent Extent.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @returns {!import("./filter/Bbox.js").default} `<BBOX>` operator. * @returns {!Bbox} `<BBOX>` operator.
* @api * @api
*/ */
export function bbox(geometryName, extent, opt_srsName) { 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 {!import("../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @returns {!import("./filter/Contains.js").default} `<Contains>` operator. * @returns {!Contains} `<Contains>` operator.
* @api * @api
*/ */
export function contains(geometryName, geometry, opt_srsName) { 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 {!import("../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @returns {!import("./filter/Intersects.js").default} `<Intersects>` operator. * @returns {!Intersects} `<Intersects>` operator.
* @api * @api
*/ */
export function intersects(geometryName, geometry, opt_srsName) { 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 {!import("../geom/Geometry.js").default} geometry Geometry.
* @param {string=} opt_srsName SRS name. No srsName attribute will be * @param {string=} opt_srsName SRS name. No srsName attribute will be
* set on geometries when this is not provided. * set on geometries when this is not provided.
* @returns {!import("./filter/Within.js").default} `<Within>` operator. * @returns {!Within} `<Within>` operator.
* @api * @api
*/ */
export function within(geometryName, geometry, opt_srsName) { 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} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare. * @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!import("./filter/EqualTo.js").default} `<PropertyIsEqualTo>` operator. * @returns {!EqualTo} `<PropertyIsEqualTo>` operator.
* @api * @api
*/ */
export function equalTo(propertyName, expression, opt_matchCase) { 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} propertyName Name of the context property to compare.
* @param {!(string|number)} expression The value to compare. * @param {!(string|number)} expression The value to compare.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!import("./filter/NotEqualTo.js").default} `<PropertyIsNotEqualTo>` operator. * @returns {!NotEqualTo} `<PropertyIsNotEqualTo>` operator.
* @api * @api
*/ */
export function notEqualTo(propertyName, expression, opt_matchCase) { 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 {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare. * @param {!number} expression The value to compare.
* @returns {!import("./filter/LessThan.js").default} `<PropertyIsLessThan>` operator. * @returns {!LessThan} `<PropertyIsLessThan>` operator.
* @api * @api
*/ */
export function lessThan(propertyName, expression) { 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 {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare. * @param {!number} expression The value to compare.
* @returns {!import("./filter/LessThanOrEqualTo.js").default} `<PropertyIsLessThanOrEqualTo>` operator. * @returns {!LessThanOrEqualTo} `<PropertyIsLessThanOrEqualTo>` operator.
* @api * @api
*/ */
export function lessThanOrEqualTo(propertyName, expression) { 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 {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare. * @param {!number} expression The value to compare.
* @returns {!import("./filter/GreaterThan.js").default} `<PropertyIsGreaterThan>` operator. * @returns {!GreaterThan} `<PropertyIsGreaterThan>` operator.
* @api * @api
*/ */
export function greaterThan(propertyName, expression) { 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 {!string} propertyName Name of the context property to compare.
* @param {!number} expression The value to compare. * @param {!number} expression The value to compare.
* @returns {!import("./filter/GreaterThanOrEqualTo.js").default} `<PropertyIsGreaterThanOrEqualTo>` operator. * @returns {!GreaterThanOrEqualTo} `<PropertyIsGreaterThanOrEqualTo>` operator.
* @api * @api
*/ */
export function greaterThanOrEqualTo(propertyName, expression) { export function greaterThanOrEqualTo(propertyName, expression) {
@@ -204,7 +204,7 @@ export function greaterThanOrEqualTo(propertyName, expression) {
* is null. * is null.
* *
* @param {!string} propertyName Name of the context property to compare. * @param {!string} propertyName Name of the context property to compare.
* @returns {!import("./filter/IsNull.js").default} `<PropertyIsNull>` operator. * @returns {!IsNull} `<PropertyIsNull>` operator.
* @api * @api
*/ */
export function isNull(propertyName) { export function isNull(propertyName) {
@@ -219,7 +219,7 @@ export function isNull(propertyName) {
* @param {!string} propertyName Name of the context property to compare. * @param {!string} propertyName Name of the context property to compare.
* @param {!number} lowerBoundary The lower bound of the range. * @param {!number} lowerBoundary The lower bound of the range.
* @param {!number} upperBoundary The upper bound of the range. * @param {!number} upperBoundary The upper bound of the range.
* @returns {!import("./filter/IsBetween.js").default} `<PropertyIsBetween>` operator. * @returns {!IsBetween} `<PropertyIsBetween>` operator.
* @api * @api
*/ */
export function between(propertyName, lowerBoundary, upperBoundary) { 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 * @param {string=} opt_escapeChar Escape character which can be used to escape
* the pattern characters. Default is '!'. * the pattern characters. Default is '!'.
* @param {boolean=} opt_matchCase Case-sensitive? * @param {boolean=} opt_matchCase Case-sensitive?
* @returns {!import("./filter/IsLike.js").default} `<PropertyIsLike>` operator. * @returns {!IsLike} `<PropertyIsLike>` operator.
* @api * @api
*/ */
export function like(propertyName, pattern, 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} propertyName Name of the context property to compare.
* @param {!string} begin The begin date in ISO-8601 format. * @param {!string} begin The begin date in ISO-8601 format.
* @param {!string} end The end date in ISO-8601 format. * @param {!string} end The end date in ISO-8601 format.
* @returns {!import("./filter/During.js").default} `<During>` operator. * @returns {!During} `<During>` operator.
* @api * @api
*/ */
export function during(propertyName, begin, end) { export function during(propertyName, begin, end) {

View File

@@ -67,7 +67,7 @@ import {add as addTransformFunc, clear as clearTransformFuncs, get as getTransfo
/** /**
* A projection as {@link module:ol/proj/Projection}, SRS identifier * A projection as {@link module:ol/proj/Projection}, SRS identifier
* string or undefined. * string or undefined.
* @typedef {import("./proj/Projection.js").default|string|undefined} ProjectionLike * @typedef {Projection|string|undefined} ProjectionLike
* @api * @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 * Add a Projection object to the list of supported projections that can be
* looked up by their code. * looked up by their code.
* *
* @param {import("./proj/Projection.js").default} projection Projection instance. * @param {Projection} projection Projection instance.
* @api * @api
*/ */
export function addProjection(projection) { export function addProjection(projection) {
@@ -139,7 +139,7 @@ export function addProjection(projection) {
/** /**
* @param {Array<import("./proj/Projection.js").default>} projections Projections. * @param {Array<Projection>} projections Projections.
*/ */
export function addProjections(projections) { export function addProjections(projections) {
projections.forEach(addProjection); projections.forEach(addProjection);
@@ -152,13 +152,13 @@ export function addProjections(projections) {
* @param {ProjectionLike} projectionLike Either a code string which is * @param {ProjectionLike} projectionLike Either a code string which is
* a combination of authority and identifier such as "EPSG:4326", or an * a combination of authority and identifier such as "EPSG:4326", or an
* existing projection object, or undefined. * 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 * @api
*/ */
export function get(projectionLike) { export function get(projectionLike) {
return typeof projectionLike === 'string' ? return typeof projectionLike === 'string' ?
projections.get(/** @type {string} */ (projectionLike)) : 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 {ProjectionLike} projection The projection.
* @param {number} resolution Nominal resolution in projection units. * @param {number} resolution Nominal resolution in projection units.
* @param {import("./coordinate.js").Coordinate} point Point to find adjusted resolution at. * @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. * Default is the projection's units.
* @return {number} Point resolution. * @return {number} Point resolution.
* @api * @api
@@ -223,7 +223,7 @@ export function getPointResolution(projection, resolution, point, opt_units) {
* Registers transformation functions that don't alter coordinates. Those allow * Registers transformation functions that don't alter coordinates. Those allow
* to transform between projections with equal meaning. * to transform between projections with equal meaning.
* *
* @param {Array<import("./proj/Projection.js").default>} projections Projections. * @param {Array<Projection>} projections Projections.
* @api * @api
*/ */
export function addEquivalentProjections(projections) { export function addEquivalentProjections(projections) {
@@ -242,9 +242,9 @@ export function addEquivalentProjections(projections) {
* Registers transformation functions to convert coordinates in any projection * Registers transformation functions to convert coordinates in any projection
* in projection1 to any projection in projection2. * in projection1 to any projection in projection2.
* *
* @param {Array<import("./proj/Projection.js").default>} projections1 Projections with equal * @param {Array<Projection>} projections1 Projections with equal
* meaning. * meaning.
* @param {Array<import("./proj/Projection.js").default>} projections2 Projections with equal * @param {Array<Projection>} projections2 Projections with equal
* meaning. * meaning.
* @param {TransformFunction} forwardTransform Transformation from any * @param {TransformFunction} forwardTransform Transformation from any
* projection in projection1 to any projection in projection2. * 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. * @param {string} defaultCode Default code.
* @return {import("./proj/Projection.js").default} Projection. * @return {Projection} Projection.
*/ */
export function createProjection(projection, defaultCode) { export function createProjection(projection, defaultCode) {
if (!projection) { if (!projection) {
@@ -282,7 +282,7 @@ export function createProjection(projection, defaultCode) {
return get(projection); return get(projection);
} else { } else {
return ( 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 * projection does represent the same geographic point as the same coordinate in
* the other projection. * the other projection.
* *
* @param {import("./proj/Projection.js").default} projection1 Projection 1. * @param {Projection} projection1 Projection 1.
* @param {import("./proj/Projection.js").default} projection2 Projection 2. * @param {Projection} projection2 Projection 2.
* @return {boolean} Equivalent. * @return {boolean} Equivalent.
* @api * @api
*/ */
@@ -410,8 +410,8 @@ export function equivalent(projection1, projection2) {
* Searches in the list of transform functions for the function for converting * Searches in the list of transform functions for the function for converting
* coordinates from the source projection to the destination projection. * coordinates from the source projection to the destination projection.
* *
* @param {import("./proj/Projection.js").default} sourceProjection Source Projection object. * @param {Projection} sourceProjection Source Projection object.
* @param {import("./proj/Projection.js").default} destinationProjection Destination Projection * @param {Projection} destinationProjection Destination Projection
* object. * object.
* @return {TransformFunction} Transform function. * @return {TransformFunction} Transform function.
*/ */
@@ -483,8 +483,8 @@ export function transformExtent(extent, source, destination) {
* Transforms the given point to the destination projection. * Transforms the given point to the destination projection.
* *
* @param {import("./coordinate.js").Coordinate} point Point. * @param {import("./coordinate.js").Coordinate} point Point.
* @param {import("./proj/Projection.js").default} sourceProjection Source projection. * @param {Projection} sourceProjection Source projection.
* @param {import("./proj/Projection.js").default} destinationProjection Destination projection. * @param {Projection} destinationProjection Destination projection.
* @return {import("./coordinate.js").Coordinate} Point. * @return {import("./coordinate.js").Coordinate} Point.
*/ */
export function transformWithProjections(point, sourceProjection, destinationProjection) { export function transformWithProjections(point, sourceProjection, destinationProjection) {

View File

@@ -60,7 +60,7 @@ import CanvasImmediateRenderer from './render/canvas/Immediate.js';
* *
* @param {CanvasRenderingContext2D} context Canvas context. * @param {CanvasRenderingContext2D} context Canvas context.
* @param {ToContextOptions=} opt_options Options. * @param {ToContextOptions=} opt_options Options.
* @return {import("./render/canvas/Immediate.js").default} Canvas Immediate. * @return {CanvasImmediateRenderer} Canvas Immediate.
* @api * @api
*/ */
export function toContext(context, opt_options) { export function toContext(context, opt_options) {

View File

@@ -163,7 +163,7 @@ export const defaultLineWidth = 1;
/** /**
* The label cache for text rendering. To change the default cache size of 2048 * The label cache for text rendering. To change the default cache size of 2048
* entries, use {@link module:ol/structs/LRUCache#setSize}. * entries, use {@link module:ol/structs/LRUCache#setSize}.
* @type {import("../structs/LRUCache.js").default<HTMLCanvasElement>} * @type {LRUCache<HTMLCanvasElement>}
* @api * @api
*/ */
export const labelCache = new LRUCache(); export const labelCache = new LRUCache();

View File

@@ -589,7 +589,7 @@ class CanvasReplay extends VectorContext {
let x, y; let x, y;
while (i < ii) { while (i < ii) {
const instruction = instructions[i]; const instruction = instructions[i];
const type = /** @type {import("./Instruction.js").default} */ (instruction[0]); const type = /** @type {CanvasInstruction} */ (instruction[0]);
switch (type) { switch (type) {
case CanvasInstruction.BEGIN_GEOMETRY: case CanvasInstruction.BEGIN_GEOMETRY:
feature = /** @type {import("../../Feature.js").default|import("../Feature.js").default} */ (instruction[1]); feature = /** @type {import("../../Feature.js").default|import("../Feature.js").default} */ (instruction[1]);
@@ -903,7 +903,7 @@ class CanvasReplay extends VectorContext {
let begin = -1; let begin = -1;
for (i = 0; i < n; ++i) { for (i = 0; i < n; ++i) {
instruction = hitDetectionInstructions[i]; instruction = hitDetectionInstructions[i];
type = /** @type {import("./Instruction.js").default} */ (instruction[0]); type = /** @type {CanvasInstruction} */ (instruction[0]);
if (type == CanvasInstruction.END_GEOMETRY) { if (type == CanvasInstruction.END_GEOMETRY) {
begin = i; begin = i;
} else if (type == CanvasInstruction.BEGIN_GEOMETRY) { } else if (type == CanvasInstruction.BEGIN_GEOMETRY) {

View File

@@ -19,8 +19,8 @@ import {create as createTransform, compose as composeTransform} from '../../tran
/** /**
* @type {Object<import("../ReplayType.js").default, * @type {Object<ReplayType,
* function(new: import("./Replay.js").default, number, import("../../extent.js").Extent, * function(new: CanvasReplay, number, import("../../extent.js").Extent,
* number, number, boolean, Array<import("../canvas.js").DeclutterGroup>)>} * number, number, boolean, Array<import("../canvas.js").DeclutterGroup>)>}
*/ */
const BATCH_CONSTRUCTORS = { const BATCH_CONSTRUCTORS = {
@@ -104,7 +104,7 @@ class CanvasReplayGroup extends ReplayGroup {
/** /**
* @private * @private
* @type {!Object<string, !Object<import("../ReplayType.js").default, import("./Replay.js").default>>} * @type {!Object<string, !Object<ReplayType, CanvasReplay>>}
*/ */
this.replaysByZIndex_ = {}; this.replaysByZIndex_ = {};
@@ -154,7 +154,7 @@ class CanvasReplayGroup extends ReplayGroup {
} }
/** /**
* @param {Array<import("../ReplayType.js").default>} replays Replays. * @param {Array<ReplayType>} replays Replays.
* @return {boolean} Has replays of the provided types. * @return {boolean} Has replays of the provided types.
*/ */
hasReplays(replays) { hasReplays(replays) {
@@ -335,7 +335,7 @@ class CanvasReplayGroup extends ReplayGroup {
} }
/** /**
* @return {Object<string, Object<import("../ReplayType.js").default, import("./Replay.js").default>>} Replays. * @return {Object<string, Object<ReplayType, CanvasReplay>>} Replays.
*/ */
getReplays() { getReplays() {
return this.replaysByZIndex_; return this.replaysByZIndex_;
@@ -354,7 +354,7 @@ class CanvasReplayGroup extends ReplayGroup {
* @param {number} viewRotation View rotation. * @param {number} viewRotation View rotation.
* @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip. * @param {Object<string, boolean>} skippedFeaturesHash Ids of features to skip.
* @param {boolean} snapToPixel Snap point symbols and test to integer pixel. * @param {boolean} snapToPixel Snap point symbols and test to integer pixel.
* @param {Array<import("../ReplayType.js").default>=} opt_replayTypes Ordered replay types to replay. * @param {Array<ReplayType>=} opt_replayTypes Ordered replay types to replay.
* Default is {@link module:ol/render/replay~ORDER} * Default is {@link module:ol/render/replay~ORDER}
* @param {Object<string, import("../canvas.js").DeclutterGroup>=} opt_declutterReplays Declutter replays. * @param {Object<string, import("../canvas.js").DeclutterGroup>=} opt_declutterReplays Declutter replays.
*/ */

View File

@@ -12,7 +12,7 @@ import TileGrid from './tilegrid/TileGrid.js';
/** /**
* @param {import("./proj/Projection.js").default} projection Projection. * @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. * passed projection.
*/ */
export function getForProjection(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("./tilecoord.js").TileCoord} tileCoord Tile coordinate.
* @param {import("./proj/Projection.js").default} projection Projection. * @param {import("./proj/Projection.js").default} projection Projection.
* @return {import("./tilecoord.js").TileCoord} Tile coordinate. * @return {import("./tilecoord.js").TileCoord} Tile coordinate.
@@ -52,8 +52,8 @@ export function wrapX(tileGrid, tileCoord, projection) {
* DEFAULT_MAX_ZOOM). * DEFAULT_MAX_ZOOM).
* @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses * @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses
* DEFAULT_TILE_SIZE). * DEFAULT_TILE_SIZE).
* @param {import("./extent/Corner.js").default=} opt_corner Extent corner (default is `'top-left'`). * @param {Corner=} opt_corner Extent corner (default is `'top-left'`).
* @return {!import("./tilegrid/TileGrid.js").default} TileGrid instance. * @return {!TileGrid} TileGrid instance.
*/ */
export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) { export function createForExtent(extent, opt_maxZoom, opt_tileSize, opt_corner) {
const corner = opt_corner !== undefined ? opt_corner : Corner.TOP_LEFT; 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. * Creates a tile grid with a standard XYZ tiling scheme.
* @param {XYZOptions=} opt_options Tile grid options. * @param {XYZOptions=} opt_options Tile grid options.
* @return {!import("./tilegrid/TileGrid.js").default} Tile grid instance. * @return {!TileGrid} Tile grid instance.
* @api * @api
*/ */
export function createXYZ(opt_options) { export function createXYZ(opt_options) {
@@ -144,8 +144,8 @@ function resolutionsFromExtent(extent, opt_maxZoom, opt_tileSize) {
* DEFAULT_MAX_ZOOM). * DEFAULT_MAX_ZOOM).
* @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses * @param {number|import("./size.js").Size=} opt_tileSize Tile size (default uses
* DEFAULT_TILE_SIZE). * DEFAULT_TILE_SIZE).
* @param {import("./extent/Corner.js").default=} opt_corner Extent corner (default is `'top-left'`). * @param {Corner=} opt_corner Extent corner (default is `'top-left'`).
* @return {!import("./tilegrid/TileGrid.js").default} TileGrid instance. * @return {!TileGrid} TileGrid instance.
*/ */
export function createForProjection(projection, opt_maxZoom, opt_tileSize, opt_corner) { export function createForProjection(projection, opt_maxZoom, opt_tileSize, opt_corner) {
const extent = extentFromProjection(projection); const extent = extentFromProjection(projection);