self-assert / DraftViewer
Interface: DraftViewer<Model>
Changes to a draft can be observed by viewers.
Viewers can be notified about changes to the draft or about failed assertions.
Type Parameters
| Type Parameter | Default type |
|---|---|
Model | any |
Draft viewers
onDraftChanged()?
optionalonDraftChanged: (aModel) =>void
Receives notifications about changes to the draft's model.
Parameters
| Parameter | Type |
|---|---|
aModel | Model |
Returns
void
onFailure()?
optionalonFailure: (aFailedAsserion) =>void
Receives notifications about failed assertions.
Parameters
| Parameter | Type |
|---|---|
aFailedAsserion | LabeledRule |
Returns
void
onFailuresReset()?
optionalonFailuresReset: () =>void
Receives notifications when the model's failed assertions are cleared.
Returns
void
