diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index 577e2f485a..42587298f0 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -11154,7 +11154,7 @@ declare module ol { * Array.>), ol.geom.SimpleGeometry=): * ol.geom.SimpleGeometry} */ - type DrawGeometryFunctionType = (coords: (ol.Coordinate | ol.Coordinate[] | ol.Coordinate[][]), geo: ol.geom.SimpleGeometry) => ol.geom.SimpleGeometry; + type DrawGeometryFunctionType = (coords: (ol.Coordinate | ol.Coordinate[] | ol.Coordinate[][]), geo?: ol.geom.SimpleGeometry) => ol.geom.SimpleGeometry; /** * A function that takes an {@link ol.MapBrowserEvent} and returns a diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index de12feeb80..f0abcf28ce 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -19,6 +19,8 @@ let featureStyleFunction: ol.FeatureStyleFunction; let featureLoader: ol.FeatureLoader; let easingFunction: (t: number) => number; let drawGeometryFunction: ol.DrawGeometryFunctionType; +drawGeometryFunction([0,0], new ol.geom.Point([0,0])); +drawGeometryFunction([0,0]); // Type variables for OpenLayers let attribution: ol.Attribution;