diff --git a/openlayers/openlayers-tests.ts b/openlayers/openlayers-tests.ts index a2152b11ad..39bc7284f2 100644 --- a/openlayers/openlayers-tests.ts +++ b/openlayers/openlayers-tests.ts @@ -546,3 +546,7 @@ var modify: ol.interaction.Modify = new ol.interaction.Modify({ var draw: ol.interaction.Draw = new ol.interaction.Draw({ type: "Point" }) + +const select: ol.interaction.Select = new ol.interaction.Select({ + layers: (layer: ol.layer.Layer) => true; +}); diff --git a/openlayers/openlayers.d.ts b/openlayers/openlayers.d.ts index d1ec613314..5ab387be4e 100644 --- a/openlayers/openlayers.d.ts +++ b/openlayers/openlayers.d.ts @@ -552,12 +552,12 @@ declare namespace olx { interface SelectOptions { addCondition?: ol.events.ConditionType; condition?: ol.events.ConditionType; - layers?: Array; + layers?: Array | ((layer: ol.layer.Layer) => boolean); style?: ol.style.Style | Array | ol.style.StyleFunction; removeCondition?: ol.events.ConditionType; toggleCondition?: ol.events.ConditionType; multi?: boolean; - features?: ol.Collection + features?: ol.Collection; filter?: ol.interaction.SelectFilterFunction; wrapX?: boolean; }