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

Server.versionAtLeast

Whether this server is at least minimum, written the way tmux writes it.

Source and package
Qualified name
Server.versionAtLeast
Module
server
Declared in
Server
Package
libtmux
Source
packages/libtmux/src/server.ts
async versionAtLeast(minimum: string): Promise<boolean>

Description#

This is how a caller gates on a feature that arrived in a known release without parsing #{version} themselves. A named development build such as next-3.9 has not shipped the release it names: it is at least 3.8, but not at least 3.9. An untargeted development build (bare master, or <tag>-master) names no release it is heading toward, so nothing bounds it — it is at least anything.

Examples#

if (await server.versionAtLeast("3.3")) {
await server.setOption("extended-keys", "on");
}
Parameters
Esc

Type to search.

Reference previewOpen reference