Remove extra imports in jsdoc

The symbols are already imported (es6 import)
This commit is contained in:
Frederic Junod
2018-09-24 10:11:01 +02:00
parent 3b208864bc
commit 557e2c9029

View File

@@ -16,7 +16,7 @@ import VectorSource from '../source/Vector.js';
* @typedef {Object} Options * @typedef {Object} Options
* @property {import("./Source.js").AttributionLike} [attributions] Attributions. * @property {import("./Source.js").AttributionLike} [attributions] Attributions.
* @property {number} [distance=20] Minimum distance in pixels between clusters. * @property {number} [distance=20] Minimum distance in pixels between clusters.
* @property {function(import("../Feature.js").default):import("../geom/Point.js").default} [geometryFunction] * @property {function(Feature):Point} [geometryFunction]
* Function that takes an {@link module:ol/Feature} as argument and returns an * Function that takes an {@link module:ol/Feature} as argument and returns an
* {@link module:ol/geom/Point} as cluster calculation point for the feature. When a * {@link module:ol/geom/Point} as cluster calculation point for the feature. When a
* feature should not be considered for clustering, the function should return * feature should not be considered for clustering, the function should return
@@ -29,7 +29,7 @@ import VectorSource from '../source/Vector.js';
* ``` * ```
* See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster * See {@link module:ol/geom/Polygon~Polygon#getInteriorPoint} for a way to get a cluster
* calculation point for polygons. * calculation point for polygons.
* @property {import("./Vector.js").default} source Source. * @property {VectorSource} source Source.
* @property {boolean} [wrapX=true] Whether to wrap the world horizontally. * @property {boolean} [wrapX=true] Whether to wrap the world horizontally.
*/ */
@@ -64,25 +64,25 @@ class Cluster extends VectorSource {
this.distance = options.distance !== undefined ? options.distance : 20; this.distance = options.distance !== undefined ? options.distance : 20;
/** /**
* @type {Array<import("../Feature.js").default>} * @type {Array<Feature>}
* @protected * @protected
*/ */
this.features = []; this.features = [];
/** /**
* @param {import("../Feature.js").default} feature Feature. * @param {Feature} feature Feature.
* @return {import("../geom/Point.js").default} Cluster calculation point. * @return {Point} Cluster calculation point.
* @protected * @protected
*/ */
this.geometryFunction = options.geometryFunction || function(feature) { this.geometryFunction = options.geometryFunction || function(feature) {
const geometry = /** @type {import("../geom/Point.js").default} */ (feature.getGeometry()); const geometry = /** @type {Point} */ (feature.getGeometry());
assert(geometry instanceof Point, assert(geometry instanceof Point,
10); // The default `geometryFunction` can only handle `import("../geom/Point.js").Point` geometries 10); // The default `geometryFunction` can only handle `Point` geometries
return geometry; return geometry;
}; };
/** /**
* @type {import("./Vector.js").default} * @type {VectorSource}
* @protected * @protected
*/ */
this.source = options.source; this.source = options.source;
@@ -101,7 +101,7 @@ class Cluster extends VectorSource {
/** /**
* Get a reference to the wrapped source. * Get a reference to the wrapped source.
* @return {import("./Vector.js").default} Source. * @return {VectorSource} Source.
* @api * @api
*/ */
getSource() { getSource() {
@@ -185,8 +185,8 @@ class Cluster extends VectorSource {
} }
/** /**
* @param {Array<import("../Feature.js").default>} features Features * @param {Array<Feature>} features Features
* @return {import("../Feature.js").default} The cluster feature. * @return {Feature} The cluster feature.
* @protected * @protected
*/ */
createCluster(features) { createCluster(features) {