Merge pull request #8766 from fredj/featurelike

Use FeatureLike typedef
This commit is contained in:
Frédéric Junod
2018-10-03 08:47:06 +02:00
committed by GitHub
15 changed files with 38 additions and 41 deletions
+2 -2
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) {