Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 4447c37

Browse files
crisbetoSplaktar
authored andcommitted
build: fix compilation errors in scenes
The `yarn build:scenes` task was failing, because there were some `strictPropertyInitialization` errors.
1 parent 901e4ac commit 4447c37

File tree

7 files changed

+10
-12
lines changed

7 files changed

+10
-12
lines changed

scenes/src/app/scene-viewer/scene-viewer.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import {DomSanitizer, SafeStyle} from '@angular/platform-browser';
2020
styleUrls: ['./scene-viewer.scss'],
2121
})
2222
export class SceneViewer implements OnInit {
23-
24-
@HostBinding('style.filter') filter: SafeStyle;
23+
@HostBinding('style.filter') filter: SafeStyle | undefined;
2524

2625
/**
2726
* Degree to change hue of scene by. All scenes default to a reddish hue.
@@ -38,8 +37,7 @@ export class SceneViewer implements OnInit {
3837
// Furthermore these checks will soon be removed.
3938
this.filter = this.sanitizer.bypassSecurityTrustStyle(`hue-rotate(${this.hueRotation}deg)`);
4039
}
41-
42-
private _hueRotation: number;
40+
private _hueRotation = 0;
4341

4442
/** Scale of scene (1 is unscaled) */
4543
@Input() scale = 1;
@@ -48,7 +46,7 @@ export class SceneViewer implements OnInit {
4846
@Input() component: any;
4947

5048
@ViewChild('scene', {read: ViewContainerRef, static: true})
51-
scene: ViewContainerRef;
49+
scene!: ViewContainerRef;
5250

5351
constructor(private readonly componentFactoryResolver: ComponentFactoryResolver,
5452
private route: ActivatedRoute,

scenes/src/app/scenes/autocomplete/autocomplete-scene.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export class AutocompleteScene implements AfterViewInit {
2222
myControl = new FormControl();
2323
options: string[] = ['hello', 'hello world'];
2424

25-
@ViewChild(MatInput) input: MatInput;
25+
@ViewChild(MatInput) input!: MatInput;
2626

2727
ngAfterViewInit() {
2828
this.input.focus();

scenes/src/app/scenes/menu/menu-scene.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {MatMenuModule, MatMenuTrigger} from '@angular/material/menu';
1010
styleUrls: ['./menu-scene.scss']
1111
})
1212
export class MenuScene implements AfterViewInit {
13-
@ViewChild('menuTrigger') trigger: MatMenuTrigger;
13+
@ViewChild('menuTrigger') trigger!: MatMenuTrigger;
1414

1515
ngAfterViewInit() {
1616
this.trigger.openMenu();

scenes/src/app/scenes/ripples/ripples-scene.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {MatRipple, MatRippleModule} from '@angular/material/core';
99
styleUrls: ['./ripples-scene.scss']
1010
})
1111
export class RipplesScene implements AfterViewInit {
12-
@ViewChild('button', {read: MatRipple}) buttonRipple: MatRipple;
13-
@ViewChild('wrapper', {read: MatRipple}) wrapperRipple: MatRipple;
12+
@ViewChild('button', {read: MatRipple}) buttonRipple!: MatRipple;
13+
@ViewChild('wrapper', {read: MatRipple}) wrapperRipple!: MatRipple;
1414

1515
ngAfterViewInit() {
1616
this.buttonRipple.launch(140, 100, {

scenes/src/app/scenes/select/select-scene.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {MatSelect, MatSelectModule} from '@angular/material/select';
99
styleUrls: ['./select-scene.scss']
1010
})
1111
export class SelectScene implements AfterViewInit {
12-
@ViewChild(MatSelect) select: MatSelect;
12+
@ViewChild(MatSelect) select!: MatSelect;
1313

1414
ngAfterViewInit() {
1515
this.select.open();

scenes/src/app/scenes/slider/slider-scene.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {MatSlider, MatSliderModule} from '@angular/material/slider';
1010
styleUrls: ['./slider-scene.scss']
1111
})
1212
export class SliderScene implements AfterViewInit {
13-
@ViewChild('volume') volume: MatSlider;
13+
@ViewChild('volume') volume!: MatSlider;
1414

1515
ngAfterViewInit() {
1616
this.volume.focus();

scenes/src/app/scenes/tooltip/tooltip-scene.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {MatIconModule} from '@angular/material/icon';
1010
styleUrls: ['./tooltip-scene.scss'],
1111
})
1212
export class TooltipScene implements AfterViewInit {
13-
@ViewChild(MatTooltip) tooltip: MatTooltip;
13+
@ViewChild(MatTooltip) tooltip!: MatTooltip;
1414

1515
ngAfterViewInit() {
1616
this.tooltip.toggle();

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy