Module: features/challenges/challenge
Components
Interfaces
Type Aliases
Challenge
Ƭ Challenge<T
>: Replace
<T
& BaseChallenge
, { canComplete
: GetComputableTypeWithDefault
<T
["canComplete"
], Ref
<boolean
>> ; canStart
: GetComputableTypeWithDefault
<T
["canStart"
], true
> ; classes
: GetComputableType
<T
["classes"
]> ; completionLimit
: GetComputableTypeWithDefault
<T
["completionLimit"
], 1
> ; display
: GetComputableType
<T
["display"
]> ; goal
: GetComputableType
<T
["goal"
]> ; mark
: GetComputableTypeWithDefault
<T
["mark"
], Ref
<boolean
>> ; style
: GetComputableType
<T
["style"
]> ; visibility
: GetComputableTypeWithDefault
<T
["visibility"
], Visible
> }>
Type parameters
Name | Type |
---|---|
T | extends ChallengeOptions |
Defined in
profectus/src/features/challenges/challenge.tsx:66
GenericChallenge
Ƭ GenericChallenge: Replace
<Challenge
<ChallengeOptions
>, { canComplete
: ProcessedComputable
<boolean
| DecimalSource
> ; canStart
: ProcessedComputable
<boolean
> ; completionLimit
: ProcessedComputable
<DecimalSource
> ; mark
: ProcessedComputable
<boolean
> ; visibility
: ProcessedComputable
<Visibility
> }>
Defined in
profectus/src/features/challenges/challenge.tsx:81
Variables
ChallengeType
• Const
ChallengeType: typeof ChallengeType
Defined in
profectus/src/features/challenges/challenge.tsx:25
Functions
createActiveChallenge
▸ createActiveChallenge(challenges
): Ref
<GenericChallenge
| undefined
>
Parameters
Name | Type |
---|---|
challenges | GenericChallenge [] |
Returns
Ref
<GenericChallenge
| undefined
>
createChallenge
▸ createChallenge<T
>(optionsFunc
): Challenge
<T
>
Type parameters
Name | Type |
---|---|
T | extends ChallengeOptions |
Parameters
Name | Type |
---|---|
optionsFunc | OptionsFunc <T , BaseChallenge , GenericChallenge > |
Returns
Challenge
<T
>
isAnyChallengeActive
▸ isAnyChallengeActive(challenges
): Ref
<boolean
>
Parameters
Name | Type |
---|---|
challenges | GenericChallenge [] | Ref <undefined | GenericChallenge > |
Returns
Ref
<boolean
>
setupAutoComplete
▸ setupAutoComplete(challenge
, autoActive?
, exitOnComplete?
): WatchStopHandle
Parameters
Name | Type | Default value |
---|---|---|
challenge | GenericChallenge | undefined |
autoActive | Computable <boolean > | true |
exitOnComplete | boolean | true |
Returns
WatchStopHandle