libtmux Reference MCP Search
On this page

types.TmuxEventStream.find

View as Markdown

Module
types
Declared in
TmuxEventStream
Package
@libtmux/libtmux
Source
packages/libtmux/src/types.ts
find ( matches : : (event: TmuxEvent) => event is Match , options : : { readonly timeoutMs?: number } ) Promise<Match | undefined> ( matches : : (event: TmuxEvent) => unknown , options : : { readonly timeoutMs?: number } ) Promise<TmuxEvent | undefined>
methodoverload2 overloads [source]
methodoverload2 overloads [source]
find

Resolve with the first event matches accepts, or undefined if the deadline passes or the stream is closed first.

This consumes the stream, which is what iterating it does anyway. It exists because every caller otherwise writes the same loop, deadline, and cleanup, and forgetting the deadline turns a missed event into a hang.

0 declared, 0 inherited

Esc

Type to search.