Skip to content

Commit a21fd5e

Browse files
committed
fix: Fixes two minor strict-TS errors.
1 parent 36f5905 commit a21fd5e

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

samples/layer-traffic/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88
async function initMap(): Promise<void> {
99
await google.maps.importLibrary('maps');
1010

11-
const mapElement = document.querySelector(
12-
'gmp-map'
13-
) as google.maps.MapElement;
11+
const mapElement =
12+
document.querySelector<google.maps.MapElement>('gmp-map')!;
1413
const innerMap = mapElement.innerMap;
1514

1615
const trafficLayer = new google.maps.TrafficLayer();
1716

1817
trafficLayer.setMap(innerMap);
1918
}
2019

21-
initMap();
20+
void initMap();
2221
// [END maps_layer_traffic]

0 commit comments

Comments
 (0)