# Function addHook

- addHook(hook: Hook): RegisteredHooks

  #### Parameters

  - hook: Hook

  #### Returns RegisteredHooks

  #### Description

  Register a callback function (a "hook") that will be called for a given hook name. Hook names are called at specific points during execution and allow some form of extensibility.

  #### Deprecated

  use `hooks.on()` instead

  - Defined in jslib/src/lib/hooks/index.ts:57