@dxos/app-framework - v0.8.2
    Preparing search index...

    Type Alias IntentEffectResult<Input, Output>

    The return value of an intent effect.

    type IntentEffectResult<Input, Output> = {
        data?: Output;
        error?: Error;
        intents?: AnyIntentChain[];
        undoable?: { data?: Partial<Input>; message: Label };
    }

    Type Parameters

    • Input
    • Output
    Index

    Properties

    data?: Output

    The output of the action that was performed.

    If the intent is apart of a chain of intents, the data will be passed to the next intent.

    error?: Error

    An error that occurred while performing the action.

    If the intent is apart of a chain of intents and an error occurs, the chain will be aborted.

    Return caught error instead of throwing to trigger other intent to be triggered prior to returning the error.

    intents?: AnyIntentChain[]

    Other intent chains to be triggered.

    undoable?: { data?: Partial<Input>; message: Label }

    If provided, the action will be undoable.

    Type declaration

    • Optionaldata?: Partial<Input>

      Will be merged with the original intent data when firing the undo intent.

    • message: Label

      Message to display to the user when indicating that the action can be undone.