Skip to main content
Version: v1

ConstraintEffect Enum

What to do when a Constraint is violated.

Signature

export declare enum ConstraintEffect

Flags

Flag Description
InvalidAndDiscard Discard Edit.
InvalidRetry Discard Edit, but record metadata that application may want to try and recover this change by recreating it. Should this be the default policy for when another (non Constraint) change is invalid?
ValidRetry Apply the change, but flag it for possible reconsideration by the app (applying it is better than not, but perhaps the high level logic could produce something better).

InvalidAndDiscard

Discard Edit.

Signature

InvalidAndDiscard = 0

InvalidRetry

Discard Edit, but record metadata that application may want to try and recover this change by recreating it. Should this be the default policy for when another (non Constraint) change is invalid?

Signature

InvalidRetry = 1

ValidRetry

Apply the change, but flag it for possible reconsideration by the app (applying it is better than not, but perhaps the high level logic could produce something better).

Signature

ValidRetry = 2