Module: features/challenges/challenge

Interfaces

Type aliases

Challenge

Ƭ Challenge<T>: Replace<T & BaseChallenge, { canComplete: GetComputableTypeWithDefault<T["canComplete"], Ref<boolean>> ; canStart: GetComputableTypeWithDefault<T["canStart"], Ref<boolean>> ; 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

NameType
Textends ChallengeOptions

Defined in

profectus/src/features/challenges/challenge.tsx:72


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:87

Variables

ChallengeType

Const ChallengeType: typeof ChallengeType

Defined in

profectus/src/features/challenges/challenge.tsx:31

Functions

createActiveChallenge

createActiveChallenge(challenges): Ref<GenericChallenge | undefined>

Parameters

NameType
challengesGenericChallenge[]

Returns

Ref<GenericChallenge | undefined>

Defined in

profectus/src/features/challenges/challenge.tsx:277


createChallenge

createChallenge<T>(optionsFunc): Challenge<T>

Type parameters

NameType
Textends ChallengeOptions

Parameters

NameType
optionsFunc() => T & ThisType<Challenge<T>>

Returns

Challenge<T>

Defined in

profectus/src/features/challenges/challenge.tsx:98


isAnyChallengeActive

isAnyChallengeActive(challenges): Ref<boolean>

Parameters

NameType
challengesGenericChallenge[] | Ref<undefined | GenericChallenge>

Returns

Ref<boolean>

Defined in

profectus/src/features/challenges/challenge.tsx:283


setupAutoComplete

setupAutoComplete(challenge, autoActive?, exitOnComplete?): WatchStopHandle

Parameters

NameTypeDefault value
challengeGenericChallengeundefined
autoActiveComputable<boolean>true
exitOnCompletebooleantrue

Returns

WatchStopHandle

Defined in

profectus/src/features/challenges/challenge.tsx:264