From 8ced6d39fe62c6c742c067b7234e73a8a2eaf972 Mon Sep 17 00:00:00 2001 From: nooras Date: Sun, 20 Oct 2024 15:39:32 +0530 Subject: [PATCH 1/2] feat: TypeScript types file [#319] --- index.d.ts | 12 ++++++++++++ package.json | 3 ++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..fa39531 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,12 @@ +declare module 'esri-leaflet-geocoder' { + export function geocode(options): any; + export var Geocode: any; + export function geocodeService(options): any; + export var GeocodeService: any; + export function geosearch(options): any; + export var Geosearch: any; + export function reverseGeocode(options): any; + export var ReverseGeocode: any; + export function suggest(options): any; + export var Suggest: any; +} \ No newline at end of file diff --git a/package.json b/package.json index 645f395..e3992b9 100644 --- a/package.json +++ b/package.json @@ -85,5 +85,6 @@ "xhr" ] }, - "style": "./dist/esri-leaflet-geocoder.css" + "style": "./dist/esri-leaflet-geocoder.css", + "types": "index.d.ts" } From 020ed987903da6f22598e651f741994b5fee309d Mon Sep 17 00:00:00 2001 From: nooras Date: Wed, 23 Oct 2024 20:26:27 +0530 Subject: [PATCH 2/2] feat: TypeScript types file update changes [#319] --- index.d.ts | 8 ++++++++ package.json | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index fa39531..63e5c32 100644 --- a/index.d.ts +++ b/index.d.ts @@ -1,10 +1,18 @@ declare module 'esri-leaflet-geocoder' { + export function arcgisOnlineProvider(options): any; + export var ArcgisOnlineProvider: any; + export function featureLayerProvider(options): any; + export var FeatureLayerProvider: any; export function geocode(options): any; export var Geocode: any; export function geocodeService(options): any; export var GeocodeService: any; + export function geocodeServiceProvider(options): any; + export var GeocodeServiceProvider: any; export function geosearch(options): any; export var Geosearch: any; + export function mapServiceProvider(options): any; + export var MapServiceProvider: any; export function reverseGeocode(options): any; export var ReverseGeocode: any; export function suggest(options): any; diff --git a/package.json b/package.json index e3992b9..2c207c7 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,8 @@ }, "files": [ "src/**/*.js", - "dist/**" + "dist/**", + "index.d.ts" ], "homepage": "https://github.com/Esri/esri-leaflet-geocoder", "jsnext:main": "src/EsriLeafletGeocoding.js",