Skip to content

Commit df7b7b2

Browse files
committed
fix(google-maps): update to latest typings and remove manual override
Bumps us to the latest version of the Google Maps typings and removes a workaround that was in place due to the old ones being incomplete.
1 parent e0b5797 commit df7b7b2

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@angular/elements": "^9.1.0",
5555
"@angular/forms": "^9.1.0",
5656
"@angular/platform-browser": "^9.1.0",
57-
"@types/googlemaps": "^3.37.0",
57+
"@types/googlemaps": "^3.39.3",
5858
"@types/youtube": "^0.0.38",
5959
"@webcomponents/custom-elements": "^1.1.0",
6060
"core-js": "^2.6.9",

src/google-maps/google-map/google-map.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,6 @@ interface GoogleMapsWindow extends Window {
3333
google?: typeof google;
3434
}
3535

36-
// TODO(mbehrlich): Update this to use original map after updating DefinitelyTyped
37-
/**
38-
* Extends the Google Map interface due to the Definitely Typed implementation
39-
* missing "getClickableIcons".
40-
*/
41-
export interface UpdatedGoogleMap extends google.maps.Map {
42-
getClickableIcons: () => boolean;
43-
}
44-
4536
/** default options set to the Googleplex */
4637
export const DEFAULT_OPTIONS: google.maps.MapOptions = {
4738
center: {lat: 37.421995, lng: -122.084092},
@@ -75,7 +66,7 @@ export class GoogleMap implements OnChanges, OnInit, OnDestroy {
7566
private readonly _zoom = new BehaviorSubject<number|undefined>(undefined);
7667
private readonly _destroy = new Subject<void>();
7768
private _mapEl: HTMLElement;
78-
_googleMap: UpdatedGoogleMap;
69+
_googleMap: google.maps.Map;
7970

8071
/** Whether we're currently rendering inside a browser. */
8172
_isBrowser: boolean;
@@ -270,7 +261,7 @@ export class GoogleMap implements OnChanges, OnInit, OnDestroy {
270261
this._setSize();
271262
this._googleMapChanges = this._initializeMap(this._combineOptions());
272263
this._googleMapChanges.subscribe((googleMap: google.maps.Map) => {
273-
this._googleMap = googleMap as UpdatedGoogleMap;
264+
this._googleMap = googleMap;
274265
this._eventManager.setTarget(this._googleMap);
275266
});
276267

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,10 +1151,10 @@
11511151
"@types/minimatch" "*"
11521152
"@types/node" "*"
11531153

1154-
"@types/googlemaps@^3.37.0":
1155-
version "3.37.0"
1156-
resolved "https://registry.yarnpkg.com/@types/googlemaps/-/googlemaps-3.37.0.tgz#85596a2b93ded3850ac83ff575b66c34053c0ac8"
1157-
integrity sha512-kUF1DCVJISf6HZQdgROIs98C0MS40AK5KXxyOju5L1aifNXqMkN5siSGErHYxpEMkDcTA/hu6Dr22fZBTt2qRA==
1154+
"@types/googlemaps@^3.39.3":
1155+
version "3.39.3"
1156+
resolved "https://registry.yarnpkg.com/@types/googlemaps/-/googlemaps-3.39.3.tgz#8664e424f335802c8aa46a94676666b0a0f31d97"
1157+
integrity sha512-L8O9HAVFZj0TuiS8h5ORthiMsrrhjxTC8XUusp5k47oXCst4VTm+qWKvrAvmYMybZVokbp4Udco1mNwJrTNZPQ==
11581158

11591159
"@types/gulp@*":
11601160
version "4.0.5"

0 commit comments

Comments
 (0)