Skip to content

Commit f5fec44

Browse files
authored
Typecast imported Map library to google.maps.MapsLibrary
1 parent ea64613 commit f5fec44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/js-api-loader-map/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const API_KEY = "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8";
1212
async function initMap(): Promise<void> {
1313
setOptions({ key: API_KEY });
1414

15-
const { Map } = await importLibrary("maps");
15+
const { Map } = await importLibrary("maps") as google.maps.MapsLibrary;
1616

1717
const mapOptions = {
1818
center: { lat: 48.8566, lng: 2.3522 },
@@ -24,4 +24,4 @@ async function initMap(): Promise<void> {
2424
}
2525

2626
initMap();
27-
// [END maps_js_api_loader_map]
27+
// [END maps_js_api_loader_map]

0 commit comments

Comments
 (0)