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.

method libtmux-ts latest

Selection.toArray

A plain array of the members, in order.

Source and package
Qualified name
Selection.toArray
Module
selection
Declared in
Selection
Package
libtmux
Source
packages/libtmux/src/selection.ts
toArray(): Model[]

Description#

The crossing to array semantics: slicing, reversing, indexing, spreading. The result is a copy, so mutating it cannot disturb the Selection.

Examples#

const ordered = snapshot.panes.toArray();
ordered.slice(0, 2).map((entry) => entry.id);
Type parameters
Esc

Type to search.

Reference previewOpen reference