From 419a2fb9443142492951bbab93eb4c111c4f985c Mon Sep 17 00:00:00 2001 From: Eric Swann Date: Mon, 18 Nov 2019 14:31:08 -0600 Subject: [PATCH] Node-Geocoder: Added StateCode to Entry interface (#40400) * Added StateCode to Entry interface * reverted no-emit flag in tsconfig --- types/node-geocoder/index.d.ts | 1 + types/node-geocoder/node-geocoder-tests.ts | 4 ++++ types/node-geocoder/tsconfig.json | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/types/node-geocoder/index.d.ts b/types/node-geocoder/index.d.ts index 851863f8b9..bea54e003a 100644 --- a/types/node-geocoder/index.d.ts +++ b/types/node-geocoder/index.d.ts @@ -105,6 +105,7 @@ declare namespace node_geocoder { zipcode?: string; provider?: string; state?: string; + stateCode?: string; county?: string; district?: string; building?: string; diff --git a/types/node-geocoder/node-geocoder-tests.ts b/types/node-geocoder/node-geocoder-tests.ts index bb554d03ba..227a6855c9 100644 --- a/types/node-geocoder/node-geocoder-tests.ts +++ b/types/node-geocoder/node-geocoder-tests.ts @@ -29,6 +29,10 @@ geocoder.geocode(query, (err: any, entries: NodeGeocoder.Entry[]) => { console.log(JSON.stringify(entries, null, 2)); }); +geocoder.geocode('Austin, TX, USA', (err: any, entries: NodeGeocoder.Entry[]) => { + console.log(JSON.stringify(entries, null, 2)); +}); + geocoder.batchGeocode([ 'Kraków', 'Warszawa' ]).then((entries) => { if (entries.length !== 2) { return; diff --git a/types/node-geocoder/tsconfig.json b/types/node-geocoder/tsconfig.json index 8076dc932c..44afd08f19 100644 --- a/types/node-geocoder/tsconfig.json +++ b/types/node-geocoder/tsconfig.json @@ -20,4 +20,4 @@ "index.d.ts", "node-geocoder-tests.ts" ] -} \ No newline at end of file +}