Add typing to components.
This commit is contained in:
@@ -14,7 +14,7 @@ export class AuthComponent implements OnInit {
|
||||
keyForm: FormGroup;
|
||||
submitted: boolean = false;
|
||||
loading: boolean = false;
|
||||
matcher = new CustomErrorStateMatcher();
|
||||
matcher: CustomErrorStateMatcher = new CustomErrorStateMatcher();
|
||||
|
||||
constructor(
|
||||
private authService: AuthService,
|
||||
@@ -58,14 +58,14 @@ export class AuthComponent implements OnInit {
|
||||
|
||||
switchWindows(): void {
|
||||
this.authService.sessionToken = undefined;
|
||||
const divOne = document.getElementById('one');
|
||||
const divTwo = document.getElementById('two');
|
||||
const divOne: HTMLElement = document.getElementById('one');
|
||||
const divTwo: HTMLElement = document.getElementById('two');
|
||||
this.toggleDisplay(divOne);
|
||||
this.toggleDisplay(divTwo);
|
||||
}
|
||||
|
||||
toggleDisplay(element: any): void {
|
||||
const style = window.getComputedStyle(element).display;
|
||||
const style: string = window.getComputedStyle(element).display;
|
||||
if (style === 'block') {
|
||||
element.style.display = 'none';
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user