Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3a7bf5

Browse files
committed
Fix lint
1 parent f501932 commit e3a7bf5

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

packages/test-workflows/src/cancel-http-request.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ const activityStarted = new ResolvablePromise<void>();
1313
const activityCancelled = new ResolvablePromise<void>();
1414

1515
const signals = {
16-
activityStarted() {
16+
activityStarted(): void {
1717
activityStarted.resolve(undefined);
1818
},
19-
activityCancelled() {
19+
activityCancelled(): void {
2020
activityCancelled.resolve(undefined);
2121
},
2222
};

packages/test-workflows/src/resolvable-promise.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
/* eslint-disable @typescript-eslint/ban-ts-comment */
2+
13
/**
24
* Helper for creating promises which can be manually resolved
35
* Copied from workflow/common

packages/worker/src/worker.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -789,11 +789,12 @@ function extractActivityInfo(
789789
activityNamespace: string
790790
): ActivityInfo {
791791
// NOTE: We trust core to supply all of these fields instead of checking for null and undefined everywhere
792+
const { taskToken, activityId } = task as NonNullableObject<coresdk.activity_task.IActivityTask>;
792793
const start = task.start as NonNullableObject<coresdk.activity_task.IStart>;
793794
const activityType = JSON.parse(start.activityType);
794795
return {
795-
taskToken: task.taskToken!,
796-
activityId: task.activityId!,
796+
taskToken,
797+
activityId,
797798
workflowExecution: start.workflowExecution as NonNullableObject<coresdk.common.WorkflowExecution>,
798799
attempt: start.attempt,
799800
isLocal,

0 commit comments

Comments
 (0)