diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index 441214cce6..538dedbc9c 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -12620,7 +12620,7 @@ declare module olx { * insertVertexCondition: (ol.EventsConditionType|undefined), * pixelTolerance: (number|undefined), * style: (ol.style.Style|Array.|ol.StyleFunction|undefined), - * features: ol.Collection., + * features: (ol.Collection.|undefined), * wrapX: (boolean|undefined), * source: (ol.source.Vector|undefined)}} */ @@ -12630,7 +12630,7 @@ declare module olx { insertVertexCondition?: ol.EventsConditionType; pixelTolerance?: number; style?: (ol.style.Style | ol.style.Style[] | ol.StyleFunction); - features: ol.Collection; + features?: ol.Collection; wrapX?: boolean; source?: ol.source.Vector; } diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index 50281ff0fe..f8e9ac91ec 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -702,10 +702,16 @@ jsonValue = geojsonFormat.writeGeometryObject(geometry, writeOptions); // // ol.interactions // -let modify: ol.interaction.Modify = new ol.interaction.Modify({ +let modifyFeature: ol.interaction.Modify = new ol.interaction.Modify({ insertVertexCondition: ol.events.condition.never, features: new ol.Collection(featureArray), }); +let modifySource: ol.interaction.Modify = new ol.interaction.Modify({ + insertVertexCondition: ol.events.condition.never, + source: new ol.source.Vector({ + features: new ol.Collection(featureArray), + }), +}); let draw: ol.interaction.Draw = new ol.interaction.Draw({ type: "Point",