# server.Server.showHooks

- **Module:** server.Server
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/server.ts#L632
- **Page:** https://libtmux.org/reference/ts/server-server-showhooks/

```
server.Server.showHooks() -> Promise<ReadonlyMap<string, readonly string[]>>
```

Every global hook tmux currently reports.

A hook is an array of commands, keyed by the name `setHook` takes, so
what was set reads back under the name it was set with. tmux prints each
element as `name[0]`, which composes with neither of the writers.

## Example

```ts
const hooks = await server.showHooks();
hooks.get("session-created")?.[0];
```
