readAnswer
function readAnswer<Q>(question, raw): AnswerTo<Q> | null;Defined in: core/src/decisions.ts:402
One answer, checked against the question that asked it, or null.
A Jev answer usually becomes an action (a click, a label, a route), so it is
read fail-closed: the right type; for a choice, a pick among the offered
options that is also the most likely one in its own full distribution. A
distribution is never rebuilt from confidence, which measures spread, not
the pick.
ask runs this on every answer. It is exported for the app that has to
keep its own request (its own error copy, its own auth refresh) and can
still take the checks.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Q extends DecisionQuestion |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
question |
Q |
raw |
unknown |
Returns
Section titled “Returns”AnswerTo<Q> | null