Skip to content

Commit a38c154

Browse files
philippfrommejarekdanielak
authored andcommitted
chore: fix TS error
1 parent 8c1fe01 commit a38c154

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/TaskExecution.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ export default class TaskExecution extends EventEmitter {
8585

8686
const startInstanceResult = await this._api.startInstance(processId, elementId, variables);
8787

88-
// @ts-ignore (it can actually change to `idle` while awaiting startInstance)
89-
if (this._status === 'idle') {
88+
if (/** @type {TaskExecutionStatus} */ (this._status) === 'idle') {
9089

9190
// Execution was canceled in the meantime
9291
return;
@@ -138,8 +137,7 @@ export default class TaskExecution extends EventEmitter {
138137
if (hasIncident) {
139138
const getProcessInstanceIncidentResult = await this._api.getProcessInstanceIncident(processInstanceKey);
140139

141-
// @ts-ignore
142-
if (this._status === 'idle') {
140+
if (/** @type {TaskExecutionStatus} */ (this._status) === 'idle') {
143141

144142
// Execution was canceled in the meantime
145143
this.cancelTaskExecution();
@@ -159,8 +157,7 @@ export default class TaskExecution extends EventEmitter {
159157
if (isCompleted || hasIncident) {
160158
const getProcessInstanceVariablesResult = await this._api.getProcessInstanceVariables(processInstanceKey);
161159

162-
// @ts-ignore
163-
if (this._status === 'idle') {
160+
if (/** @type {TaskExecutionStatus} */ (this._status) === 'idle') {
164161

165162
// Execution was canceled in the meantime
166163
this.cancelTaskExecution();

0 commit comments

Comments
 (0)