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
* @property {import("./Source.js").AttributionLike} [attributions] Attributions.
* @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
* {@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
@@ -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
* 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.
*/
@@ -64,25 +64,25 @@ class Cluster extends VectorSource {
this.distance = options.distance !== undefined ? options.distance : 20;
/**
* @type {Array<import("../Feature.js").default>}
* @type {Array<Feature>}
* @protected
*/
this.features = [];
/**
* @param {import("../Feature.js").default} feature Feature.
* @return {import("../geom/Point.js").default} Cluster calculation point.
* @param {Feature} feature Feature.
* @return {Point} Cluster calculation point.
* @protected
*/
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,
10); // The default `geometryFunction` can only handle `import("../geom/Point.js").Point` geometries
10); // The default `geometryFunction` can only handle `Point` geometries
return geometry;
};
/**
* @type {import("./Vector.js").default}
* @type {VectorSource}
* @protected
*/
this.source = options.source;
@@ -101,7 +101,7 @@ class Cluster extends VectorSource {
/**
* Get a reference to the wrapped source.
* @return {import("./Vector.js").default} Source.
* @return {VectorSource} Source.
* @api
*/
getSource() {
@@ -185,8 +185,8 @@ class Cluster extends VectorSource {
}
/**
* @param {Array<import("../Feature.js").default>} features Features
* @return {import("../Feature.js").default} The cluster feature.
* @param {Array<Feature>} features Features
* @return {Feature} The cluster feature.
* @protected
*/
createCluster(features) {