Skip to content

Commit cc61697

Browse files
fix(google-maps): implicitly include google.maps types instead of the triple slash workaround (angular#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
1 parent 025010b commit cc61697

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

0 commit comments

Comments
 (0)