Arc.React
    Preparing search index...

    Interface CommandScopeCallbacks

    Defines the callbacks that can be provided to a CommandScopeImplementation.

    interface CommandScopeCallbacks {
        onBeforeExecute?: (command: ICommand) => void;
        onException?: (command: ICommand, result: CommandResult) => void;
        onFailed?: (command: ICommand, result: CommandResult) => void;
        onSuccess?: (command: ICommand, result: CommandResult) => void;
        onUnauthorized?: (command: ICommand, result: CommandResult) => void;
        onValidationFailure?: (command: ICommand, result: CommandResult) => void;
    }
    Index

    Properties

    onBeforeExecute?: (command: ICommand) => void

    Called before each command is executed.

    Type Declaration

      • (command: ICommand): void
      • Parameters

        • command: ICommand

          The command that is about to be executed.

        Returns void

    onException?: (command: ICommand, result: CommandResult) => void

    Called when a command fails due to an exception.

    Type Declaration

      • (command: ICommand, result: CommandResult): void
      • Parameters

        • command: ICommand

          The command that was executed.

        • result: CommandResult

          The result of the execution.

        Returns void

    onFailed?: (command: ICommand, result: CommandResult) => void

    Called when a command fails for any reason.

    Type Declaration

      • (command: ICommand, result: CommandResult): void
      • Parameters

        • command: ICommand

          The command that was executed.

        • result: CommandResult

          The result of the execution.

        Returns void

    onSuccess?: (command: ICommand, result: CommandResult) => void

    Called when a command executes successfully.

    Type Declaration

      • (command: ICommand, result: CommandResult): void
      • Parameters

        • command: ICommand

          The command that was executed.

        • result: CommandResult

          The result of the execution.

        Returns void

    onUnauthorized?: (command: ICommand, result: CommandResult) => void

    Called when a command fails due to an authorization failure.

    Type Declaration

      • (command: ICommand, result: CommandResult): void
      • Parameters

        • command: ICommand

          The command that was executed.

        • result: CommandResult

          The result of the execution.

        Returns void

    onValidationFailure?: (command: ICommand, result: CommandResult) => void

    Called when a command fails due to validation errors.

    Type Declaration

      • (command: ICommand, result: CommandResult): void
      • Parameters

        • command: ICommand

          The command that was executed.

        • result: CommandResult

          The result of the execution.

        Returns void