diff --git a/types/openlayers/index.d.ts b/types/openlayers/index.d.ts index a4d4f52d5e..a6122c8477 100644 --- a/types/openlayers/index.d.ts +++ b/types/openlayers/index.d.ts @@ -1734,7 +1734,7 @@ export class Feature extends Object { * @api stable * @observable */ - setStyle(style: (ol.style.Style | ol.style.Style[] | ol.FeatureStyleFunction | ol.StyleFunction)): void; + setStyle(style: (ol.style.Style | ol.style.Style[] | ol.FeatureStyleFunction | ol.StyleFunction | null)): void; /** * Set the feature id. The feature id is considered stable and may be used when @@ -6424,7 +6424,7 @@ export namespace layer { * @param style Layer style. * @api stable */ - setStyle(style: (ol.style.Style | ol.style.Style[] | ol.StyleFunction)): void; + setStyle(style: (ol.style.Style | ol.style.Style[] | ol.StyleFunction | null)): void; } /** diff --git a/types/openlayers/openlayers-tests.ts b/types/openlayers/openlayers-tests.ts index d97a96c9de..fcf925886d 100644 --- a/types/openlayers/openlayers-tests.ts +++ b/types/openlayers/openlayers-tests.ts @@ -411,6 +411,7 @@ feature.setGeometry(geometry); feature.setGeometryName(stringValue); feature.setId(stringValue); feature.setId(numberValue); +feature.setStyle(null); feature.setStyle(style); feature.setStyle(styleArray); feature.setStyle(featureStyleFunction);