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 11import Step from "./Step" ;
22import StepId from "./StepId" ;
3+ import { STEP_TYPE_QUIZ } from "./StepEnums" ;
34
45class QuizStep extends Step {
56 constructor (
@@ -10,7 +11,7 @@ class QuizStep extends Step {
1011 }
1112
1213 type ( ) : string {
13- return 'quiz'
14+ return STEP_TYPE_QUIZ
1415 }
1516}
1617
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 11import StepId from "./StepId" ;
22import Step from "./Step" ;
3+ import { STEP_TYPE_VIDEO } from "./StepEnums" ;
34
45class VideoStep extends Step {
56 constructor (
@@ -10,7 +11,7 @@ class VideoStep extends Step {
1011 }
1112
1213 type ( ) : string {
13- return 'video'
14+ return STEP_TYPE_VIDEO
1415 }
1516
1617 getVideoDuration ( ) : number {
You can’t perform that action at this time.
0 commit comments