Use FeatureLike typedef

Use `import("./Feature.js").FeatureLike` typedef instead of `import("./Feature.js").default|import("./render/Feature.js").default`
This commit is contained in:
Frederic Junod
2018-10-02 12:58:55 +02:00
parent 023ad3c531
commit ae87cad7ef
15 changed files with 38 additions and 41 deletions

View File

@@ -161,7 +161,7 @@ class MVT extends FeatureFormat {
* @param {Object} pbf PBF
* @param {Object} rawFeature Raw Mapbox feature.
* @param {import("./Feature.js").ReadOptions=} opt_options Read options.
* @return {import("../Feature.js").default|RenderFeature} Feature.
* @return {import("../Feature.js").FeatureLike} Feature.
*/
createFeature_(pbf, rawFeature, opt_options) {
const type = rawFeature.type;
@@ -246,7 +246,7 @@ class MVT extends FeatureFormat {
const pbf = new PBF(/** @type {ArrayBuffer} */ (source));
const pbfLayers = pbf.readFields(layersPBFReader, {});
/** @type {Array<import("../Feature.js").default|RenderFeature>} */
/** @type {Array<import("../Feature.js").FeatureLike>} */
const features = [];
for (const name in pbfLayers) {
if (layers && layers.indexOf(name) == -1) {