Skip to content

Commit 278f29e

Browse files
josephperrottmmalerba
authored andcommitted
fix(google-maps): implicitly include google.maps types instead of the triple slash workaround (#30942)
Previously, due to an issue with the rules_nodejs toolchain we had to include the google.maps namespace types via a triple slash comment with preserve set to true, this changes to instead include the types in the tsconfig as normal (cherry picked from commit cc61697)
1 parent 5fa5185 commit 278f29e

File tree

24 files changed

+17
-64
lines changed

24 files changed

+17
-64
lines changed

src/google-maps/BUILD.bazel

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ rules_js_tsconfig(
1414
],
1515
)
1616

17+
rules_js_tsconfig(
18+
name = "tsconfig",
19+
src = "tsconfig-build.json",
20+
deps = [
21+
"//:node_modules/@types/google.maps",
22+
"//src:build-tsconfig",
23+
],
24+
)
25+
1726
ng_project(
1827
name = "google-maps",
1928
srcs = glob(
@@ -22,6 +31,7 @@ ng_project(
2231
"**/*.spec.ts",
2332
],
2433
),
34+
tsconfig = ":tsconfig",
2535
deps = [
2636
"//:node_modules/@angular/common",
2737
"//:node_modules/@angular/core",

src/google-maps/deprecated-map-marker-clusterer/deprecated-map-marker-clusterer.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
AfterContentInit,
1411
ChangeDetectionStrategy,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
ChangeDetectionStrategy,
1411
Component,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Input,
1411
OnDestroy,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
export interface MapAnchorPoint {
1310
getAnchor(): google.maps.MVCObject | google.maps.marker.AdvancedMarkerElement;
1411
}

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {Directive, NgZone, OnDestroy, OnInit, inject} from '@angular/core';
1310

1411
import {GoogleMap} from './google-map/google-map';

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {Directive, EventEmitter, NgZone, OnDestroy, OnInit, Output, inject} from '@angular/core';
1310

1411
import {GoogleMap} from '../google-map/google-map';

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Directive,
1411
EventEmitter,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Directive,
1411
EventEmitter,

src/google-maps/map-directions-renderer/map-directions-service.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {Injectable, NgZone, inject} from '@angular/core';
1310
import {Observable} from 'rxjs';
1411

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {Injectable, NgZone, inject} from '@angular/core';
1310
import {Observable} from 'rxjs';
1411

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Directive,
1411
EventEmitter,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Input,
1411
OnDestroy,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Directive,
1411
ElementRef,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Directive,
1411
EventEmitter,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
ChangeDetectionStrategy,
1411
Component,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Input,
1411
OnDestroy,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Directive,
1411
Input,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Directive,
1411
Input,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Directive,
1411
Input,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {
1310
Directive,
1411
EventEmitter,

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* found in the LICENSE file at https://angular.dev/license
77
*/
88

9-
// Workaround for: https://github.com/bazelbuild/rules_nodejs/issues/1265
10-
/// <reference types="google.maps" preserve="true" />
11-
129
import {Directive, EventEmitter, NgZone, OnDestroy, OnInit, Output, inject} from '@angular/core';
1310

1411
import {GoogleMap} from '../google-map/google-map';

src/google-maps/tsconfig-build.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "../bazel-tsconfig-build.json",
3+
"compilerOptions": {
4+
"types": ["google.maps"]
5+
}
6+
}

src/google-maps/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"rootDir": "..",
66
"baseUrl": ".",
77
"paths": {},
8-
"types": ["jasmine"]
8+
"types": ["jasmine", "google.maps"]
99
},
1010
"include": ["./**/*.ts", "../dev-mode-types.d.ts"]
1111
}

0 commit comments

Comments
 (0)