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

+1
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

+1-1
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

+1-1
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

+4-4
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

+2-2
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

+2-2
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

+2-2
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

+2-2
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

+2-2
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

+4-4
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);

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ export class ControlRotateComponent implements OnInit, OnDestroy {
2424
// console.log('instancing aol-control-rotate');
2525
}
2626

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

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

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ export class ControlScaleLineComponent implements OnInit, OnDestroy {
1616
// console.log('instancing aol-control-scaleline');
1717
}
1818

19-
ngOnInit() {
19+
ngOnInit(): void {
2020
this.instance = new ScaleLine(this);
2121
this.map.instance.addControl(this.instance);
2222
}
2323

24-
ngOnDestroy() {
24+
ngOnDestroy(): void {
2525
// console.log('removing aol-control-scaleline');
2626
this.map.instance.removeControl(this.instance);
2727
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ export class ControlZoomComponent implements OnInit, OnDestroy {
2626
// console.log('instancing aol-control-zoom');
2727
}
2828

29-
ngOnInit() {
29+
ngOnInit(): void {
3030
this.instance = new Zoom(this);
3131
this.map.instance.addControl(this.instance);
3232
}
3333

34-
ngOnDestroy() {
34+
ngOnDestroy(): void {
3535
// console.log('removing aol-control-zoom');
3636
this.map.instance.removeControl(this.instance);
3737
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ export class ControlZoomSliderComponent implements OnInit, OnDestroy {
2222
// console.log('instancing aol-control-zoomslider');
2323
}
2424

25-
ngOnInit() {
25+
ngOnInit(): void {
2626
this.instance = new ZoomSlider(this);
2727
this.map.instance.addControl(this.instance);
2828
}
2929

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

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ export class ControlZoomToExtentComponent implements OnInit, OnDestroy {
2323
// console.log('instancing aol-control-zoomtoextent');
2424
}
2525

26-
ngOnInit() {
26+
ngOnInit(): void {
2727
this.instance = new ZoomToExtent(this);
2828
this.map.instance.addControl(this.instance);
2929
}
3030

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

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,22 @@ export class CoordinateComponent implements OnChanges, OnInit {
4040
}
4141
}
4242

43-
ngOnInit() {
43+
ngOnInit(): void {
4444
this.map.instance.on('change:view', (e) => this.onMapViewChanged(e));
4545
this.mapSrid = this.map.instance.getView().getProjection().getCode();
4646
this.transformCoordinates();
4747
}
4848

49-
ngOnChanges(changes: SimpleChanges) {
49+
ngOnChanges(changes: SimpleChanges): void {
5050
this.transformCoordinates();
5151
}
5252

53-
private onMapViewChanged(event) {
53+
private onMapViewChanged(event): void {
5454
this.mapSrid = event.target.get(event.key).getProjection().getCode();
5555
this.transformCoordinates();
5656
}
5757

58-
private transformCoordinates() {
58+
private transformCoordinates(): void {
5959
let transformedCoordinates: number[];
6060

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

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ export class FeatureComponent implements OnInit, OnDestroy, OnChanges {
1515

1616
constructor(private host: SourceVectorComponent) {}
1717

18-
ngOnInit() {
18+
ngOnInit(): void {
1919
this.instance = new Feature();
2020
if (this.id !== undefined) {
2121
this.instance.setId(this.id);
2222
}
2323
this.host.instance.addFeature(this.instance);
2424
}
2525

26-
ngOnDestroy() {
26+
ngOnDestroy(): void {
2727
this.host.instance.removeFeature(this.instance);
2828
}
2929

30-
ngOnChanges(changes: SimpleChanges) {
30+
ngOnChanges(changes: SimpleChanges): void {
3131
if (this.instance) {
3232
this.instance.setId(this.id);
3333
}

projects/ngx-openlayers/src/lib/geom/geometrylinestring.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class GeometryLinestringComponent extends SimpleGeometryComponent impleme
1616
super(map, host);
1717
}
1818

19-
ngOnInit() {
19+
ngOnInit(): void {
2020
this.instance = new LineString([
2121
[0, 0],
2222
[1, 1],

projects/ngx-openlayers/src/lib/geom/geometrymultilinestring.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class GeometryMultiLinestringComponent extends SimpleGeometryComponent im
1616
super(map, host);
1717
}
1818

19-
ngOnInit() {
19+
ngOnInit(): void {
2020
this.instance = new MultiLineString([
2121
[
2222
[0, 0],

projects/ngx-openlayers/src/lib/geom/geometrymultipoint.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class GeometryMultiPointComponent extends SimpleGeometryComponent impleme
1616
super(map, host);
1717
}
1818

19-
ngOnInit() {
19+
ngOnInit(): void {
2020
this.instance = new MultiPoint([
2121
[0, 0],
2222
[1, 1],

projects/ngx-openlayers/src/lib/geom/geometrymultipolygon.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class GeometryMultiPolygonComponent extends SimpleGeometryComponent imple
1616
super(map, host);
1717
}
1818

19-
ngOnInit() {
19+
ngOnInit(): void {
2020
this.instance = new MultiPolygon([
2121
[
2222
[

projects/ngx-openlayers/src/lib/geom/geometrypoint.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class GeometryPointComponent extends SimpleGeometryComponent implements O
1616
super(map, host);
1717
}
1818

19-
ngOnInit() {
19+
ngOnInit(): void {
2020
this.instance = new Point([0, 0]);
2121
super.ngOnInit();
2222
}

projects/ngx-openlayers/src/lib/geom/geometrypolygon.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class GeometryPolygonComponent extends SimpleGeometryComponent implements
1616
super(map, host);
1717
}
1818

19-
ngOnInit() {
19+
ngOnInit(): void {
2020
this.instance = new Polygon([
2121
[
2222
[0, 0],

projects/ngx-openlayers/src/lib/geom/simplegeometry.component.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export abstract class SimpleGeometryComponent implements OnInit {
1212

1313
constructor(protected map: MapComponent, protected host: FeatureComponent) {}
1414

15-
ngOnInit() {
15+
ngOnInit(): void {
1616
this.host.instance.setGeometry(this.instance);
1717
}
1818
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class GraticuleComponent implements AfterContentInit, OnChanges, OnDestro
2222

2323
constructor(private map: MapComponent) {}
2424

25-
ngOnChanges(changes: SimpleChanges) {
25+
ngOnChanges(changes: SimpleChanges): void {
2626
const properties: { [index: string]: any } = {};
2727

2828
if (!this.instance) {

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ export class DefaultInteractionComponent implements OnInit, OnDestroy {
1212

1313
constructor(private map: MapComponent) {}
1414

15-
ngOnInit() {
15+
ngOnInit(): void {
1616
this.instance = defaults();
1717
this.instance.forEach((i) => this.map.instance.addInteraction(i));
1818
}
1919

20-
ngOnDestroy() {
20+
ngOnDestroy(): void {
2121
this.instance.forEach((i) => this.map.instance.removeInteraction(i));
2222
}
2323
}

projects/ngx-openlayers/src/lib/interactions/doubleclickzoom.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ export class DoubleClickZoomInteractionComponent implements OnInit, OnDestroy {
1616

1717
constructor(private map: MapComponent) {}
1818

19-
ngOnInit() {
19+
ngOnInit(): void {
2020
this.instance = new DoubleClickZoom(this);
2121
this.map.instance.addInteraction(this.instance);
2222
}
2323

24-
ngOnDestroy() {
24+
ngOnDestroy(): void {
2525
this.map.instance.removeInteraction(this.instance);
2626
}
2727
}

0 commit comments

Comments
 (0)