Decision
type Decision<P> = | Allow | Veto | Amend<P>| Defer<P>;What a should… hook returns. It is one of four objects: Allow lets the change go through, Veto refuses it, Amend replaces it, and Defer asks the app to wait for the decision. Each is built by a function of the same name: allow(), veto(), amend() and defer().
The app reads the returned object and makes the decision itself.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Description |
|---|---|
P |
the type of the replacement that an Amend decision carries. For the hooks of ctx.hooks, it is ChangeDraft. |
