Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow an array of string in ComponentRestrictions #81

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

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