File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -13,10 +13,10 @@ const activityStarted = new ResolvablePromise<void>();
13
13
const activityCancelled = new ResolvablePromise < void > ( ) ;
14
14
15
15
const signals = {
16
- activityStarted ( ) {
16
+ activityStarted ( ) : void {
17
17
activityStarted . resolve ( undefined ) ;
18
18
} ,
19
- activityCancelled ( ) {
19
+ activityCancelled ( ) : void {
20
20
activityCancelled . resolve ( undefined ) ;
21
21
} ,
22
22
} ;
Original file line number Diff line number Diff line change
1
+ /* eslint-disable @typescript-eslint/ban-ts-comment */
2
+
1
3
/**
2
4
* Helper for creating promises which can be manually resolved
3
5
* Copied from workflow/common
Original file line number Diff line number Diff line change @@ -789,11 +789,12 @@ function extractActivityInfo(
789
789
activityNamespace : string
790
790
) : ActivityInfo {
791
791
// 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 > ;
792
793
const start = task . start as NonNullableObject < coresdk . activity_task . IStart > ;
793
794
const activityType = JSON . parse ( start . activityType ) ;
794
795
return {
795
- taskToken : task . taskToken ! ,
796
- activityId : task . activityId ! ,
796
+ taskToken,
797
+ activityId,
797
798
workflowExecution : start . workflowExecution as NonNullableObject < coresdk . common . WorkflowExecution > ,
798
799
attempt : start . attempt ,
799
800
isLocal,
You can’t perform that action at this time.
0 commit comments