From a6223abdce485310cdc851759057f5023bc4fada Mon Sep 17 00:00:00 2001 From: Kevin Schmidt Date: Tue, 25 Sep 2018 13:14:20 -0600 Subject: [PATCH] Fix TypeScript errors in ol/format/GeoJSON --- src/ol/format/GeoJSON.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index dcb532b040..060836f263 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -293,7 +293,7 @@ function readGeometry(object, opt_options) { throw new Error('Unsupported GeoJSON type: ' + object.type); } } - return transformWithOptions(geometry, false, opt_options); + return /** @type {import("../geom/Geometry.js").default} */ (transformWithOptions(geometry, false, opt_options)); } @@ -375,7 +375,7 @@ function readPolygonGeometry(object) { * @return {GeoJSONGeometry} GeoJSON geometry. */ function writeGeometry(geometry, opt_options) { - geometry = transformWithOptions(geometry, true, opt_options); + geometry = /** @type {import("../geom/Geometry.js").default} */ (transformWithOptions(geometry, true, opt_options)); const type = geometry.getType(); /** @type {GeoJSONGeometry} */