From e29f2a423c608a4af8234d45671312eb870ba5b5 Mon Sep 17 00:00:00 2001 From: Antonio V Date: Tue, 18 Apr 2023 11:09:05 +0200 Subject: [PATCH] types file extended --- index.d.ts | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/index.d.ts b/index.d.ts index 8ade824..79470cc 100644 --- a/index.d.ts +++ b/index.d.ts @@ -3,10 +3,26 @@ import * as L from 'leaflet'; declare module 'leaflet' { - namespace Geoserver { - export function wms(baseLayerUrl: any, options?: any): any; - export function wfs(baseLayerUrl: any, options?: any): any; - export function legend(baseLayerUrl: any, options?: any): any; - export function wmsImage(baseLayerUrl: any, options?: any): any; - } + interface GeoserverOptions { + layers?: string; + format?: string; + transparent?: boolean; + CQL_FILTER?: string; + zIndex?: number; + version?: string; + srsname?: string; + attribution?: string; + fitLayer?: boolean; + style?: string; + onEachFeature?: (feature: any, layer?: Layer) => void; + width?: number; + height?: number; + } + + namespace Geoserver { + export function wms(baseLayerUrl: string, options?: GeoserverOptions): L.TileLayer.WMS; + export function wfs(baseLayerUrl: string, options?: GeoserverOptions): any; + export function legend(baseLayerUrl: string, options?: GeoserverOptions): L.Control; + export function wmsImage(baseLayerUrl: string, options?: GeoserverOptions): any; + } }