mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-16 23:10:29 +00:00
OpenLayers - allow null in setStyle() (#27485)
* Update index.d.ts allow null as per method description * update setStyle for layers and add a test
This commit is contained in:
Vendored
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user