In Material-UI documentation there is an example of how to use Autocomplete with Google Maps.
Everything works fine, but there are couple of any
. My project has strict policies on using any
, so I would like to get rid of them (or have justification if it's unavoidable).
While I could get rid of some of them, in this part I couldn't find a solution how to remove or replace them with proper types.
if (!autocompleteService.current && (window as any).google) {
autocompleteService.current = new (window as any).google.maps.places.AutocompleteService();
}
Is there a way to avoid using any
here?
(Here is link to Autocomplete demo on codesandbox)