Skip to main content

IModelAction <T>

A model action translates a change in intent into resources.

Octo diffs your models, and for every Diff it produces it asks each registered action whether the diff is its concern. The actions that accept it declare the resources that change has to bring about. This is the only place a model becomes infrastructure.

Register the class with Action, and a Factory to construct it.

@group

Models

@see

Definition of Actions.

Type parameters

  • T: UnknownModule

Index

Methods

filter

  • filter(diff: Diff): boolean
  • Whether this action handles the given diff. Typically a check on the diff's node, field, and action.


    Parameters

    Returns boolean

handle

  • Declares the resources this diff calls for.


    Parameters

    Returns Promise<ActionOutputs>

    actionOutputs, with this action's resources added.

Page Options