Action
Callable
Type parameters
- T: UnknownNode
Parameters
forNode: Constructable<T>
The class of node for which this action is being declared.
Returns (constructor: any) => void
The decorated class.
Parameters
constructor: any
Returns void
The class of node for which this action is being declared.
The decorated class.
An
@Actionis a class decorator to be placed on top of a class that reacts to a change in the node it is declared for. Octo diffs your infrastructure on every run, and invokes the actions whose node changed.The interface the action implements is determined by the node it is declared for.
The decorated class is resolved through the Container, so it must have a registered Factory.
Decorators
Definition of Actions.