File tree Expand file tree Collapse file tree
projects/services-layers/src/lib/types Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ export interface ILayerExpanded {
160160 expanded ?: boolean ;
161161}
162162
163- export interface ILayerOptions {
163+ export interface ILayerOptions < T = any > {
164164 name : string ;
165165 id : string ;
166166 // id: string
@@ -174,7 +174,7 @@ export interface ILayerOptions {
174174 attribution ?: string ;
175175 displayName ?: string ;
176176 description ?: string | IDynamicComponent ;
177- properties ?: IAnyObject ;
177+ properties ?: T ;
178178 time ?: string ;
179179 minResolution ?: number ;
180180 maxResolution ?: number ;
@@ -300,7 +300,7 @@ export interface IStackedLayerOptions extends Omit<ILayerOptions, 'type'> {
300300/**
301301 * Classes for layer construction
302302 */
303- export class Layer implements ILayerOptions {
303+ export class Layer < T = any > implements ILayerOptions < T > {
304304 name = '' ;
305305 id = '' ;
306306 type : TLayertype ;
@@ -313,7 +313,7 @@ export class Layer implements ILayerOptions {
313313 attribution ?: string ;
314314 displayName ?: string ;
315315 description ?: string | IDynamicComponent ;
316- properties ?: IAnyObject ;
316+ properties ?: T = { } as T ;
317317 protected protTime ?: string ;
318318 minResolution ?: number ;
319319 maxResolution ?: number ;
You can’t perform that action at this time.
0 commit comments