interface RegisterHookConfig {
    args: {
        add?: { default: boolean; idx?: number; name: string };
        after?: { default: boolean; idx?: number; name: string };
        expr: { idx?: number; name: string };
    };
    hook: OnFnExit;
}

Properties

Properties

args: {
    add?: { default: boolean; idx?: number; name: string };
    after?: { default: boolean; idx?: number; name: string };
    expr: { idx?: number; name: string };
}

Type declaration

  • Optionaladd?: { default: boolean; idx?: number; name: string }

    argument to control whether to add or replace the current hook

  • Optionalafter?: { default: boolean; idx?: number; name: string }

    argument to control whether to run the hook before or after other hooks

  • expr: { idx?: number; name: string }

    the expression to register as hook

hook: OnFnExit

name of the hook to register, 'fn-exit' if it triggers on exit