Skip to content

Commit

Permalink
phases to ts
Browse files Browse the repository at this point in the history
  • Loading branch information
knownasilya committed Aug 16, 2020
1 parent 3e30e00 commit a6ffce0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { inject as service } from '@ember/service';
import { action } from '@ember/object';
import io from 'socket.io-client';
import { cloneDeep } from 'lodash-es';
import PHASES from 'strider-ui/utils/legacy/phases';
import PHASES, { Phase } from 'strider-ui/utils/legacy/phases';
import SKELS from 'strider-ui/utils/legacy/skels';
import Live from 'strider-ui/services/live';

Expand Down Expand Up @@ -41,7 +41,7 @@ export default class LiveJob extends Component<Args> {
}
if (!job.phases) {
job.phases = {};
PHASES.forEach((phase) => {
PHASES.forEach((phase: Phase) => {
job.phases[phase] = cloneDeep(SKELS.phase);
});
job.phases[job.phase].started = new Date();
Expand Down
1 change: 0 additions & 1 deletion clients/strider-ui/app/utils/legacy/phases.js

This file was deleted.

3 changes: 3 additions & 0 deletions clients/strider-ui/app/utils/legacy/phases.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export type Phase = 'environment' | 'prepare' | 'test' | 'deploy' | 'cleanup';

export default ['environment', 'prepare', 'test', 'deploy', 'cleanup'];

0 comments on commit a6ffce0

Please sign in to comment.