import{_ as e,c as t,o as a,a as l}from"./app.ab34650d.js";const f=JSON.parse('{"title":"Module: features/challenges/challenge","description":"","frontmatter":{"editLink":false},"headers":[{"level":2,"title":"Components","slug":"components"},{"level":2,"title":"Interfaces","slug":"interfaces"},{"level":2,"title":"Type Aliases","slug":"type-aliases"},{"level":3,"title":"Challenge","slug":"challenge"},{"level":3,"title":"GenericChallenge","slug":"genericchallenge"},{"level":2,"title":"Variables","slug":"variables"},{"level":3,"title":"ChallengeType","slug":"challengetype"},{"level":2,"title":"Functions","slug":"functions"},{"level":3,"title":"createActiveChallenge","slug":"createactivechallenge"},{"level":3,"title":"createChallenge","slug":"createchallenge"},{"level":3,"title":"isAnyChallengeActive","slug":"isanychallengeactive"},{"level":3,"title":"setupAutoComplete","slug":"setupautocomplete"}],"relativePath":"api/modules/features/challenges/challenge.md","lastUpdated":null}'),c={name:"api/modules/features/challenges/challenge.md"},d=l('
\u01AC 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
> }>
Name | Type |
---|---|
T | extends ChallengeOptions |
profectus/src/features/challenges/challenge.tsx:66
\u01AC GenericChallenge: Replace
<Challenge
<ChallengeOptions
>, { canComplete
: ProcessedComputable
<boolean
| DecimalSource
> ; canStart
: ProcessedComputable
<boolean
> ; completionLimit
: ProcessedComputable
<DecimalSource
> ; mark
: ProcessedComputable
<boolean
> ; visibility
: ProcessedComputable
<Visibility
> }>
profectus/src/features/challenges/challenge.tsx:81
\u2022 Const
ChallengeType: typeof ChallengeType
profectus/src/features/challenges/challenge.tsx:25
\u25B8 createActiveChallenge(challenges
): Ref
<GenericChallenge
| undefined
>
Name | Type |
---|---|
challenges | GenericChallenge [] |
Ref
<GenericChallenge
| undefined
>
\u25B8 createChallenge<T
>(optionsFunc
): Challenge
<T
>
Name | Type |
---|---|
T | extends ChallengeOptions |
Name | Type |
---|---|
optionsFunc | OptionsFunc <T , BaseChallenge , GenericChallenge > |
Challenge
<T
>
\u25B8 isAnyChallengeActive(challenges
): Ref
<boolean
>
Name | Type |
---|---|
challenges | GenericChallenge [] | Ref <undefined | GenericChallenge > |
Ref
<boolean
>
\u25B8 setupAutoComplete(challenge
, autoActive?
, exitOnComplete?
): WatchStopHandle
Name | Type | Default value |
---|---|---|
challenge | GenericChallenge | undefined |
autoActive | Computable <boolean > | true |
exitOnComplete | boolean | true |
WatchStopHandle