SheetXL - v0.3.20
    Preparing search index...

    Interface ICommandHook<STATE, CONTEXT>

    A hook that can be passed to a command execute function.

    interface ICommandHook<STATE extends any, CONTEXT extends any = void> {
        beforeExecute(
            command: ICommand<STATE, CONTEXT>,
            args: STATE,
        ): boolean | void | Promise<boolean | void>;
        onError(command: ICommand<STATE, CONTEXT>, error: any, args: STATE): void;
        onExecute(command: ICommand<STATE, CONTEXT>, args: STATE): void;
    }

    Type Parameters

    • STATE extends any
    • CONTEXT extends any = void
    Index

    Methods

    • If implemented will be called when execute is called. If a promise is return if will wait until this is completed.

      Parameters

      Returns boolean | void | Promise<boolean | void>

    • Called when a command failed to executed successfully.

      Parameters

      Returns void

    • Called when a command has been executed successful.

      Parameters

      Returns void