Scale
Defined in: src/expressions/scale.ts:12
A degree, not a probability. A scale describes ordered situations and the model returns a position along them. Kept distinct from predicates on purpose: “how much does this disrupt work” is not “is this disruptive”.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Scale<
T>(question,levels,name?):Scale<T>
Defined in: src/expressions/scale.ts:16
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
question |
string |
levels |
readonly EntryType[] |
name? |
string |
Returns
Section titled “Returns”Scale<T>
Properties
Section titled “Properties”| Property | Modifier | Type | Defined in |
|---|---|---|---|
question |
readonly |
string |
src/expressions/scale.ts:17 |
levels |
readonly |
readonly EntryType[] |
src/expressions/scale.ts:18 |
name? |
readonly |
string |
src/expressions/scale.ts:19 |
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get top():
number
Defined in: src/expressions/scale.ts:28
Highest level index; scores run from 0 to this.
Returns
Section titled “Returns”number
Methods
Section titled “Methods”named()
Section titled “named()”named(
name):Scale<T>
Defined in: src/expressions/scale.ts:33
Give the scale a name for traces and plans.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
string |
Returns
Section titled “Returns”Scale<T>
toQuestion()
Section titled “toQuestion()”toQuestion():
ScoreQuestion
Defined in: src/expressions/scale.ts:38
The Score question this scale compiles to.
Returns
Section titled “Returns”ScoreQuestion
toJSON()
Section titled “toJSON()”toJSON():
unknown
Defined in: src/expressions/scale.ts:43
Serializable form: name, question, and levels.
Returns
Section titled “Returns”unknown