Skip to content
This repository was archived by the owner on Dec 14, 2020. It is now read-only.

Commit 4f2c56e

Browse files
committed
ci(tsc): Fixes build.
1 parent 91b52f4 commit 4f2c56e

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/statementCreators/actionOnSiteActivity.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Moment } from 'moment';
1+
import { Duration } from 'moment';
22
import UserSiteActivityAction from '../actionUtils/UserSiteActivityAction';
33
import { site, source } from '../statementConstants/activityTypes';
44
import createActivity from '../statementUtils/createActivity';
@@ -18,8 +18,8 @@ export interface SiteActivityAction extends UserSiteActivityAction {
1818
/** Determines if the activity was passed or failed. */
1919
readonly passed?: boolean;
2020

21-
/** Determines how long the activity took as an ISO Duration. */
22-
readonly duration?: Moment.Duration;
21+
/** Determines how long the activity took. */
22+
readonly duration?: Duration;
2323
}
2424

2525
/**
@@ -45,7 +45,9 @@ export default function actionOnSiteActivity(action: SiteActivityAction): Statem
4545
result: pickDefined({
4646
completion: action.completed,
4747
success: action.passed,
48-
duration: action.duration,
48+
duration: action.duration === undefined ? undefined : (
49+
action.duration.toISOString()
50+
),
4951
}),
5052
}),
5153
context: {

0 commit comments

Comments
 (0)