Skip to content

Commit 8df5fb6

Browse files
refactor(tsconfig): activate strict templates
1 parent c3a2371 commit 8df5fb6

File tree

96 files changed

+234
-243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+234
-243
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"@angular/compiler-cli": "^14.3.0",
4141
"@angular/language-service": "^14.3.0",
4242
"@types/arcgis-rest-api": "^10.4.5",
43+
"@types/hammerjs": "^2.0.41",
4344
"@types/jasmine": "~4.3.1",
4445
"@types/node": "^12.11.1",
4546
"@types/topojson-specification": "^1.0.2",

projects/ngx-openlayers/src/lib/attribution.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class AttributionComponent implements OnInit {
1111

1212
constructor(private elementRef: ElementRef) {}
1313

14-
ngOnInit() {
14+
ngOnInit(): void {
1515
this.html = this.elementRef.nativeElement.innerHTML;
1616
this.instance = new Attribution();
1717
}

projects/ngx-openlayers/src/lib/attributions.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class AttributionsComponent implements AfterViewInit {
1515
constructor(@Host() private source: SourceComponent) {}
1616

1717
/* we can do this at the very end */
18-
ngAfterViewInit() {
18+
ngAfterViewInit(): void {
1919
if (this.attributions.length) {
2020
this.instance = this.attributions.map((cmp) => cmp.html);
2121
// console.log('setting attributions:', this.instance);

projects/ngx-openlayers/src/lib/collectioncoordinates.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,22 @@ export class CollectionCoordinatesComponent implements OnChanges, OnInit {
4444
}
4545
}
4646

47-
ngOnInit() {
47+
ngOnInit(): void {
4848
this.map.instance.on('change:view', (e) => this.onMapViewChanged(e));
4949
this.mapSrid = this.map.instance.getView().getProjection().getCode();
5050
this.transformCoordinates();
5151
}
5252

53-
ngOnChanges(changes: SimpleChanges) {
53+
ngOnChanges(changes: SimpleChanges): void {
5454
this.transformCoordinates();
5555
}
5656

57-
private onMapViewChanged(event) {
57+
private onMapViewChanged(event): void {
5858
this.mapSrid = event.target.get(event.key).getProjection().getCode();
5959
this.transformCoordinates();
6060
}
6161

62-
private transformCoordinates() {
62+
private transformCoordinates(): void {
6363
let transformedCoordinates: Coordinate[] | Coordinate[][] | Coordinate[][][];
6464

6565
if (this.srid === this.mapSrid) {

projects/ngx-openlayers/src/lib/controls/attribution.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ export class ControlAttributionComponent implements OnInit, OnDestroy {
1616

1717
constructor(private map: MapComponent, private element: ElementRef) {}
1818

19-
ngOnInit() {
19+
ngOnInit(): void {
2020
this.target = this.element.nativeElement;
2121
// console.log('ol.control.Attribution init: ', this);
2222
this.instance = new Attribution(this);
2323
this.map.instance.addControl(this.instance);
2424
}
2525

26-
ngOnDestroy() {
26+
ngOnDestroy(): void {
2727
// console.log('removing aol-control-attribution');
2828
this.map.instance.removeControl(this.instance);
2929
}

projects/ngx-openlayers/src/lib/controls/control.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ export class ControlComponent implements OnInit, OnDestroy {
1717

1818
constructor(private map: MapComponent) {}
1919

20-
ngOnInit() {
20+
ngOnInit(): void {
2121
if (this.content) {
2222
this.element = this.content.elementRef.nativeElement;
2323
this.instance = new Control(this);
2424
this.map.instance.addControl(this.instance);
2525
}
2626
}
2727

28-
ngOnDestroy() {
28+
ngOnDestroy(): void {
2929
if (this.instance) {
3030
this.map.instance.removeControl(this.instance);
3131
}

projects/ngx-openlayers/src/lib/controls/default.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ export class DefaultControlComponent implements OnInit, OnDestroy {
2929

3030
constructor(private map: MapComponent) {}
3131

32-
ngOnInit() {
32+
ngOnInit(): void {
3333
// console.log('ol.control.defaults init: ', this);
3434
this.instance = defaults(this);
3535
this.instance.forEach((c) => this.map.instance.addControl(c));
3636
}
3737

38-
ngOnDestroy() {
38+
ngOnDestroy(): void {
3939
// console.log('removing aol-control-defaults');
4040
this.instance.forEach((c) => this.map.instance.removeControl(c));
4141
}

projects/ngx-openlayers/src/lib/controls/fullscreen.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ export class ControlFullScreenComponent implements OnInit, OnDestroy {
2424
// console.log('instancing aol-control-fullscreen');
2525
}
2626

27-
ngOnInit() {
27+
ngOnInit(): void {
2828
this.instance = new FullScreen(this);
2929
this.map.instance.addControl(this.instance);
3030
}
3131

32-
ngOnDestroy() {
32+
ngOnDestroy(): void {
3333
// console.log('removing aol-control-fullscreen');
3434
this.map.instance.removeControl(this.instance);
3535
}

projects/ngx-openlayers/src/lib/controls/mouseposition.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ export class ControlMousePositionComponent implements OnInit, OnDestroy {
1919

2020
constructor(private map: MapComponent, private element: ElementRef) {}
2121

22-
ngOnInit() {
22+
ngOnInit(): void {
2323
this.target = this.element.nativeElement;
2424
// console.log('ol.control.MousePosition init: ', this);
2525
this.instance = new MousePosition(this);
2626
this.map.instance.addControl(this.instance);
2727
}
2828

29-
ngOnDestroy() {
29+
ngOnDestroy(): void {
3030
// console.log('removing aol-control-mouseposition');
3131
this.map.instance.removeControl(this.instance);
3232
}

projects/ngx-openlayers/src/lib/controls/overviewmap.component.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@ export class ControlOverviewMapComponent implements OnInit, OnChanges, OnDestroy
3030

3131
constructor(private map: MapComponent) {}
3232

33-
ngOnInit() {
33+
ngOnInit(): void {
3434
this.instance = new OverviewMap(this);
3535
this.map.instance.addControl(this.instance);
3636
}
3737

38-
ngOnDestroy() {
38+
ngOnDestroy(): void {
3939
this.map.instance.removeControl(this.instance);
4040
}
4141

42-
ngOnChanges(changes: SimpleChanges) {
42+
ngOnChanges(changes: SimpleChanges): void {
4343
if (this.instance != null && changes.hasOwnProperty('view')) {
4444
this.reloadInstance();
4545
}
4646
}
4747

48-
private reloadInstance() {
48+
private reloadInstance(): void {
4949
this.map.instance.removeControl(this.instance);
5050
this.instance = new OverviewMap(this);
5151
this.map.instance.addControl(this.instance);

0 commit comments

Comments
 (0)