Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

typealias libtmux-ts latest

TmuxInvocationObserver

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

Source and package
Qualified name
TmuxInvocationObserver
Module
common
Package
libtmux
Source
packages/libtmux/src/common.ts
type common.TmuxInvocationObserver = (report: TmuxInvocationReport) => void

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.

Esc

Type to search.

Reference previewOpen reference