File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
examples/typescript/ts-step_shotgun_surgery-01_base/src/Domain Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1
1
import Step from "./Step" ;
2
2
import StepId from "./StepId" ;
3
+ import { STEP_TYPE_QUIZ } from "./StepEnums" ;
3
4
4
5
class QuizStep extends Step {
5
6
constructor (
@@ -10,7 +11,7 @@ class QuizStep extends Step {
10
11
}
11
12
12
13
type ( ) : string {
13
- return 'quiz'
14
+ return STEP_TYPE_QUIZ
14
15
}
15
16
}
16
17
Original file line number Diff line number Diff line change
1
+ export const STEP_TYPE_VIDEO = 'video' ;
2
+ export const STEP_TYPE_QUIZ = 'quiz' ;
3
+
4
+ export const STEP_DURATION_MULTIPLIER_VIDEO = 1.1 ;
5
+ export const STEP_DURATION_MULTIPLIER_QUIZ = 1.5 ;
6
+
7
+ export const QUIZ_QUESTION_DURATION = 5 ;
8
+
9
+ // Important: don't forget to add here the type!!
10
+ export const STEP_TYPES = [
11
+ STEP_TYPE_VIDEO ,
12
+ STEP_TYPE_QUIZ
13
+ ] ;
Original file line number Diff line number Diff line change 1
1
import StepId from "./StepId" ;
2
2
import Step from "./Step" ;
3
+ import { STEP_TYPE_VIDEO } from "./StepEnums" ;
3
4
4
5
class VideoStep extends Step {
5
6
constructor (
@@ -10,7 +11,7 @@ class VideoStep extends Step {
10
11
}
11
12
12
13
type ( ) : string {
13
- return 'video'
14
+ return STEP_TYPE_VIDEO
14
15
}
15
16
16
17
getVideoDuration ( ) : number {
You can’t perform that action at this time.
0 commit comments