Create helpers to create the delegates needed for updating and fetching and assessments along specific dimensions:
/**
* The minimal interface needed for an assessment widget
*/
export interface InputAssessmentWidgetDelegate {
getLatestAssessmentForUser(): Assessment // get the latest assessment value the user created (or none if never assessed or invalidated)
subscribe(_:CallbackFn): UnsubscribeFn // subscribe to when the current assessment changes
createAssessment(assessment: Assessment): Assessment // create an assessment
invalidateLastAssessment(): void // invalidate the last created assessment [ignore for now, we only support creating new assessments]
}
/**
* The minimal interface needed to render computed assessments
*/
export interface OutputAssessmentWidgetDelegate {
getLatestAssessment(): Assessment // get the latest computed assessment value (regardless of user, for computed dimensions)
subscribe(_:CallbackFn): UnsubscribeFn // subscribe to when the current computed dimension changes
}
Do we have a method for fetching the latest assessment for a given user?
Create helpers to create the delegates needed for updating and fetching and assessments along specific dimensions:
Do we have a method for fetching the latest assessment for a given user?