Class: DefaultChecklistStateProvider<I, S, G, L, B>
Defined in: src/sdk/checklist/DefaultChecklistStateProvider.ts:114
A default implementation of ChecklistStateProvider.
Type Parameters
| Type Parameter | Default type | Description |
|---|---|---|
I extends BaseChecklistItemTypeDefMap | BaseChecklistItemTypeDefMap | A map from checklist item types to checklist item definitions used by the checklists contained in the provider's checklist set. Defaults to BaseChecklistItemTypeDefMap. |
S | unknown | The metadata attached to the provider's checklist set. |
G | unknown | The metadata attached to the checklist groups contained in the provider's checklist set. |
L | unknown | The metadata attached to the checklist lists contained in the provider's checklist set. |
B | unknown | The metadata attached to the checklist branches contained in the provider's checklist set. |
Implements
ChecklistStateProvider<I,S,G,L,B>
Constructors
Constructor
new DefaultChecklistStateProvider<
I,S,G,L,B>(index,bus,checklistSetDef):DefaultChecklistStateProvider<I,S,G,L,B>
Defined in: src/sdk/checklist/DefaultChecklistStateProvider.ts:135
Creates a new instance of DefaultChecklistStateProvider. The provider is created in an uninitialized state and
must be initialized by calling init() before it can update its data.
Parameters
| Parameter | Type | Description |
|---|---|---|
index | number | The index of this provider's checklist set. |
bus | EventBus | The event bus. |
checklistSetDef | ChecklistSetDef<I, S, G, L, B> | The definition for this provider's checklist set. |
Returns
DefaultChecklistStateProvider<I, S, G, L, B>
Properties
index
readonlyindex:number
Defined in: src/sdk/checklist/DefaultChecklistStateProvider.ts:136
The index of this provider's checklist set.
Implementation of
state
readonlystate:ChecklistSet<I,S,G,L,B>
Defined in: src/sdk/checklist/DefaultChecklistStateProvider.ts:118
The current checklist state.
Implementation of
Methods
destroy()
destroy():
void
Defined in: src/sdk/checklist/DefaultChecklistStateProvider.ts:870
Destroys this provider. Once destroyed, this provider will no longer update its provided data, and can no longer be paused or resumed.
Returns
void
init()
init(
paused):void
Defined in: src/sdk/checklist/DefaultChecklistStateProvider.ts:354
Initializes this provider. Once initialized, this provider will continuously update its data until paused or destroyed.
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
paused | boolean | false | Whether to initialize this provider as paused. Defaults to false. |
Returns
void
Throws
Error if this provider has been destroyed.
pause()
pause():
void
Defined in: src/sdk/checklist/DefaultChecklistStateProvider.ts:413
Pauses this provider. Once paused, this provider will not update its data until it is resumed.
Returns
void
Throws
Error if this provider has been destroyed.
resume()
resume():
void
Defined in: src/sdk/checklist/DefaultChecklistStateProvider.ts:386
Resumes this provider. Once resumed, this provider will continuously update its data until paused or destroyed.
Returns
void
Throws
Error if this provider has been destroyed.