@@ -36,6 +36,7 @@ import {
3636 LayerDescriptor ,
3737 VectorLayerDescriptor ,
3838 VectorSourceRequestMeta ,
39+ VectorStylePropertiesDescriptor ,
3940} from '../../../../common/descriptor_types' ;
4041import { IVectorSource } from '../../sources/vector_source' ;
4142import { LICENSED_FEATURES } from '../../../licensed_features' ;
@@ -79,13 +80,15 @@ function getClusterStyleDescriptor(
7980 clusterSource : ESGeoGridSource
8081) : VectorStyleDescriptor {
8182 const defaultDynamicProperties = getDefaultDynamicProperties ( ) ;
82- const clusterStyleDescriptor : VectorStyleDescriptor = {
83+ const clusterStyleDescriptor : Omit < VectorStyleDescriptor , 'properties' > & {
84+ properties : Partial < VectorStylePropertiesDescriptor > ;
85+ } = {
8386 type : LAYER_STYLE_TYPE . VECTOR ,
8487 properties : {
8588 [ VECTOR_STYLES . LABEL_TEXT ] : {
8689 type : STYLE_TYPE . DYNAMIC ,
8790 options : {
88- ...defaultDynamicProperties [ VECTOR_STYLES . LABEL_TEXT ] ! . options ,
91+ ...defaultDynamicProperties [ VECTOR_STYLES . LABEL_TEXT ] . options ,
8992 field : {
9093 name : COUNT_PROP_NAME ,
9194 origin : FIELD_ORIGIN . SOURCE ,
@@ -95,7 +98,7 @@ function getClusterStyleDescriptor(
9598 [ VECTOR_STYLES . ICON_SIZE ] : {
9699 type : STYLE_TYPE . DYNAMIC ,
97100 options : {
98- ...( defaultDynamicProperties [ VECTOR_STYLES . ICON_SIZE ] ! . options as SizeDynamicOptions ) ,
101+ ...( defaultDynamicProperties [ VECTOR_STYLES . ICON_SIZE ] . options as SizeDynamicOptions ) ,
99102 field : {
100103 name : COUNT_PROP_NAME ,
101104 origin : FIELD_ORIGIN . SOURCE ,
@@ -157,7 +160,7 @@ function getClusterStyleDescriptor(
157160 }
158161 } ) ;
159162
160- return clusterStyleDescriptor ;
163+ return clusterStyleDescriptor as VectorStyleDescriptor ;
161164}
162165
163166export interface BlendedVectorLayerArguments {
0 commit comments