Optionaladd?: { default: boolean; idx?: number; name: string }Optionalafter?: { default: boolean; idx?: number; name: string }argument to control whether to run the hook before or after other hooks
the expression to register as hook
name of the hook to register, 'fn-exit' if it triggers on exit
argument to control whether to add or replace the current hook