# common.TmuxInvocationObserver

- **Module:** common
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** typealias
- **Source:** https://github.com/libtmux/libtmux-ts/blob/46cccfef2a546de55ce8b308249b8c76339089a0/packages/libtmux/src/common.ts#L210
- **Page:** https://libtmux.org/en/ts/latest/reference/common-tmuxinvocationobserver/

```ts
type TmuxInvocationObserver = (report: TmuxInvocationReport) => void
```

Called once per tmux invocation, after it answers or fails.

This is the seam for logs, traces and metrics: a caller that wants to see
what the library is doing has otherwise to supply a whole engine. It runs
after the invocation is decided and cannot change its outcome — anything it
throws is swallowed, because a command must not fail on account of the code
watching it.

Returning a promise is allowed and never awaited: the invocation has already
been decided, so waiting would only delay it. A rejection is swallowed on
the same grounds as a throw, rather than left to the host's unhandled
rejection policy.
