TmuxInvocationObserver
Called once per tmux invocation, after it answers or fails.
Source and package
- Qualified name
-
TmuxInvocation Observer - Module
- common
- Package
- libtmux
- Source
- packages/libtmux/src/common.ts
- type common.TmuxInvocationObserver = (report: Tmux
Invocation ) => voidReport -
Description#
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.