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.

function libtmux-ts latest

parseLegacyWhere

Convert the Python port's name__contains spelling to canonical criteria.

Source and package
Qualified name
parseLegacyWhere
Module
selection
Package
libtmux
Source
packages/libtmux/src/selection.ts
function parseLegacyWhere< Model extends "session" | "window", >( model: Model, input: unknown, ): Extract<WhereDocumentV1, { readonly model: Model }>

Description#

Accepts one own data property on a plain object and never invokes accessors or conversion hooks. The returned document and its criteria are frozen.

Examples#

import { parseLegacyWhere } from "libtmux/selection";
const document = parseLegacyWhere("window", { name__contains: "log" });
snapshot.windows.where(document.where);
Type parameters
  • Model #

    Bound "session" | "window"

Parameters
Raises
  • QueryValidationError – when the model is not session or window, or the input is not exactly one string-valued name__contains property.

Esc

Type to search.

Reference previewOpen reference