activated typescript strict mode

This commit is contained in:
2021-05-22 15:30:04 +02:00
parent a195fafa6b
commit cb2c028ca4
76 changed files with 511 additions and 296 deletions

View File

@@ -6,13 +6,13 @@ import {EditComponent} from './edit.component';
@Injectable({
providedIn: 'root',
})
export class EditSongGuard implements CanDeactivate<unknown> {
export class EditSongGuard implements CanDeactivate<EditComponent> {
public canDeactivate(
component: EditComponent,
currentRoute: ActivatedRouteSnapshot,
currentState: RouterStateSnapshot,
nextState?: RouterStateSnapshot
nextState: RouterStateSnapshot
): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
return component.editSongComponent.askForSave(nextState);
return component.editSongComponent ? component.editSongComponent.askForSave(nextState) : true;
}
}