Commit c33a4343 authored by Alexander Philipp Nowosad's avatar Alexander Philipp Nowosad
Browse files

Fix element loader return types

parent be08d1d1
......@@ -7,7 +7,7 @@ import { subscribeOn, tap } from 'rxjs/operators';
export abstract class ElementLoaderService implements OnDestroy {
private _loadedObservable: Observable<void> = null;
private _loaded: Subject<void> = null;
get loaded() {
get loaded(): Observable<void> {
return this._loadedObservable;
}
......@@ -21,7 +21,7 @@ export abstract class ElementLoaderService implements OnDestroy {
this.init();
}
private init() {
private init(): void {
this._loaded = new Subject<void>();
this._loadedObservable = this._loaded.asObservable();
this.routeSubscription = this.route.paramMap
......@@ -39,20 +39,20 @@ export abstract class ElementLoaderService implements OnDestroy {
*/
protected abstract initParams(paramMap: ParamMap);
ngOnDestroy() {
ngOnDestroy(): void {
this.checkUnsubscribeChangesFeed();
this.routeSubscription.unsubscribe();
this._loaded.complete();
}
private checkUnsubscribeChangesFeed() {
private checkUnsubscribeChangesFeed(): void {
if (this._changesFeed) {
this._changesFeed.unsubscribe();
this._changesFeed = null;
}
}
protected elementLoaded() {
protected elementLoaded(): void {
this._loaded.next();
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment