Skip to main content

Conditions

Stentor API Reference


Stentor API Reference / stentor-models/src / Conditions

Interface: Conditions

Defined in: packages/stentor-models/src/Conditional.ts:47

Beta

Definition of conditions.

Remarks​

A couple of notes on the behavior:

  • If passed musts and shoulds, they are ANDed (or &&) together. All musts must pass and at least one should needs to pass.
  • If only one shoulds is provided, it must return true for the conditions to be met.
  • If multiple shoulds are passed

Properties​

must?​

optional must: (object | Contexts)[]

Defined in: packages/stentor-models/src/Conditional.ts:53

Beta

All objects within must return true in order for the conditions to be met.

It might be helpful to think of these as ANDs (or &&)


should?​

optional should: (object | Contexts)[]

Defined in: packages/stentor-models/src/Conditional.ts:59

Beta

Only one of the objects within the array must pass for the conditions to be met.

If only one is provided, it must pass for the conditions to be met.