Skip to content

Conversation

@DeepSnowNeeL
Copy link

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
Copy link
Author

DeepSnowNeeL commented Mar 1, 2021

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 ?

@jondewoo
Copy link

👍🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants