Add typing to components.

This commit is contained in:
Spencer Ofwiti
2021-04-30 15:50:16 +03:00
parent 9921488a04
commit 53d6d6b7a4
20 changed files with 107 additions and 111 deletions

View File

@@ -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 {