Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

selection.Selection.oneOrUndefined

TypeScript
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript
  • Rust Unavailable
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
selection
Declared in
Selection
Package
libtmux
Source
packages/libtmux/src/selection.ts
oneOrUndefined ( criteria : : WhereOf<Model> ) → Model | undefined
method [source]
method [source]
oneOrUndefined

The single member, or undefined when there is none.

one without the empty case: several still throws, because that says the criteria were wrong rather than that the answer is absent.

Examples

snapshot.sessions.oneOrUndefined({ name: "work" })?.id;

Discussed in Filtering and queries

0 declared, 0 inherited

Esc

Type to search.