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

Fix process api return types

parent 94e6e27f
......@@ -24,7 +24,7 @@ export class ProcessApiService implements OnDestroy {
this.init();
}
private init() {
private init(): void {
this.querySubscription = this.route.queryParamMap.subscribe((params) => {
this.stepInfo = {
step: params.has('step') ? +params.get('step') : undefined,
......@@ -45,7 +45,7 @@ export class ProcessApiService implements OnDestroy {
});
}
ngOnDestroy() {
ngOnDestroy(): void {
this.checkUnsubscribeChangesFeed();
this.querySubscription.unsubscribe();
}
......@@ -58,7 +58,11 @@ export class ProcessApiService implements OnDestroy {
return this.runningMethod.currentStepNumber === this.stepInfo.step;
}
get queryParams() {
get queryParams(): {
step: number;
runningProcessId: string;
executionId: string;
} {
return {
step: this.stepInfo.step != null ? this.stepInfo.step : undefined,
runningProcessId: this.runningProcess
......@@ -69,7 +73,7 @@ export class ProcessApiService implements OnDestroy {
};
}
private async loadProcessInfo() {
private async loadProcessInfo(): Promise<void> {
try {
this.runningProcess = await this.runningProcessService.get(
this.stepInfo.runningProcessId
......@@ -90,7 +94,7 @@ export class ProcessApiService implements OnDestroy {
}
}
private checkUnsubscribeChangesFeed() {
private checkUnsubscribeChangesFeed(): void {
if (this.changesFeed) {
this.changesFeed.unsubscribe();
this.changesFeed = null;
......
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