ngx-google-places-autocomplete icon indicating copy to clipboard operation
ngx-google-places-autocomplete copied to clipboard

Allow an array of string in ComponentRestrictions

Open DeepSnowNeeL opened this issue 4 years ago • 2 comments

As the google doc says, it should be allowed to have an array here. See https://developers.google.com/maps/documentation/javascript/reference/places-autocomplete-service#ComponentRestrictions

Why I'm proposing this change: With the new updates to the language server, I added "angularCompilerOptions":{ "strictTemplates":true } to my tsconfig which now throws an error like :

error TS2739: Type '{ componentRestrictions: { country: string[]; }; types: string[]; }' is missing the following properties from type 'Options': bounds, fields, strictBounds, origin
38         [options]="options"

Since I had in my code : (screenshot to see the reason of the error) image

DeepSnowNeeL avatar Mar 01 '21 14:03 DeepSnowNeeL

I just added the optionals on the Options class too as they throw an error when not using the ctor to build the object.

Btw, origin is not documented on https://developers.google.com/maps/documentation/javascript/reference/places-widget#AutocompleteOptions maybe it should be removed from the Options class ?

DeepSnowNeeL avatar Mar 01 '21 14:03 DeepSnowNeeL

👍🏼

jondewoo avatar May 26 '21 07:05 jondewoo